Announcement Announcement Module
No announcement yet.
clientId with concurrentConsumer Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • clientId with concurrentConsumer

    How to specify clientId property for org.springframework.jms.listener.DefaultMessageLis tenerContainer in configuration file when maxConcurrentConsumers property set more then one..should all thread share the single connection ?

  • #2
    clientID is set on connection not on DMLC


    • #3
      public void setClientId(String clientId)Specify the JMS client id for a shared Connection created and used by this container.
      Note that client ids need to be unique among all active Connections of the underlying JMS provider. Furthermore, a client id can only be assigned if the original ConnectionFactory hasn't already assigned one.

      Its mentioned in the documents of springframework...still my question is if maxConcurrent consumer vlaue is 5 then its connection is shared by the thred


      • #4
        This should work fine when using a shared Connection... DMLC's "clientId" property only applies to such a shared Connection setup in the first place.

        The number of concurrent consumers is independent from the Connection setup (since the Connection is thread-safe whereas the Sessions and consumers aren't), so I don't see any showstoppers here.