4 Replies Latest reply on Aug 27, 2013 6:22 AM by Andy Taylor

    MDB Durable Subscription and ClientID

    Simon Martinelli Novice



      I have a MDB with this configuration.


      @MessageDriven(activationConfig = {

              @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),

              @ActivationConfigProperty(propertyName = "destination", propertyValue = "/jms/CustomerTopic"),

              @ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable"),

              @ActivationConfigProperty(propertyName = "clientID", propertyValue = "proshop") })

      public class CustomerUpdater implements MessageListener {


      But since th clientID is a constant I get an error:


      10:06:30,828 ERROR [org.hornetq.ra.inflow.HornetQActivation] @ Unable to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@1704c0e destination=/jms/CustomerTopic destinationType=javax.jms.Topic ack=Auto-acknowledge durable=true clientID=proshop user=null maxSession=15): javax.jms.IllegalStateException: Cannot create a subscriber on the durable subscription since it already has subscriber(s)


      How can I set the clientID programatically?


      Thanks, Simon