Results 1 to 2 of 2

Thread: Setting DefaultMessageListenerContainer thread names

  1. #1
    Join Date
    Aug 2011
    Posts
    2

    Question 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 at 07:38 AM.

  2. #2

    Default 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
    Quote 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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •