Announcement Announcement Module
Collapse
No announcement yet.
Setting DefaultMessageListenerContainer thread names Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting DefaultMessageListenerContainer thread names

    Greetings,

    I'd like to customize the names of consumer threads that service JMS queues. My motivation is to ease the debugging of an application with dozens of queues and hundreds of consumer threads servicing those queues.

    The problem is that by default all consumer thread names have the form: DefaultMessageListenerContainer-#, where # is an integer. This thread naming convention does not result in unique names nor does it allow threads to be easily associated with their queues.

    Is there a way to specify the prefix used to name consumer threads?

    We use Spring 3.0.3 with ServiceMix 4.3.0, Camel 2.4, and ActiveMQ 5.4.1.

    We specify camel routes as follows:

    <route>
    <from uri= "activemq:queue:MYQUEUE?concurrentConsumers=10 " />
    ...
    </route>


    We also specify the ActiveMQConnectionFactory and PooledConnectionFactory classes in our configuration files.

    Thanks for any thoughts on the subject,
    Rich
    Last edited by richcar; Aug 8th, 2011, 07:38 AM.

  • #2
    Did you find a solution

    Hello,
    Did you find a way to customize the names of the consumer threads ?
    If so, can you explain your solution, I'm having the same problem.
    Kind regards,
    EDH
    Originally posted by richcar View Post
    Greetings,

    I'd like to customize the names of consumer threads that service JMS queues. My motivation is to ease the debugging of an application with dozens of queues and hundreds of consumer threads servicing those queues.

    The problem is that by default all consumer thread names have the form: DefaultMessageListenerContainer-#, where # is an integer. This thread naming convention does not result in unique names nor does it allow threads to be easily associated with their queues.

    Is there a way to specify the prefix used to name consumer threads?

    We use Spring 3.0.3 with ServiceMix 4.3.0, Camel 2.4, and ActiveMQ 5.4.1.

    We specify camel routes as follows:

    <route>
    <from uri= "activemq:queue:MYQUEUE?concurrentConsumers=10 " />
    ...
    </route>


    We also specify the ActiveMQConnectionFactory and PooledConnectionFactory classes in our configuration files.

    Thanks for any thoughts on the subject,
    Rich

    Comment

    Working...
    X