Yep, let's try to speak code cause think I'm not lucky with words today ;)
When you start a consumer it will call org.apache.activemq.ActiveMQMessageConsumer#start which will run the consumer in its own thread which is not the session (connection) thread. Then depending what you put behind (spring or not, jta or not) you have another thread pool to delegate the processing of the message. Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> | JavaEE Factory <https://javaeefactory-rmannibucau.rhcloud.com> 2016-08-25 17:53 GMT+02:00 KDillon <[email protected]>: > But I print out the Thread ID on the consumption on the message. > > Consumer1 97 received Hello World! 13 > Consumer1 97 received Hello World! 14 > Consumer1 97 received Hello World! 15 > Consumer1 99 received Hello World! 16 > Consumer1 99 received Hello World! 17 > ...... > Consumer1 99 received Hello World! 237 > Consumer1 99 received Hello World! 238 > Consumer1 97 received Hello World! 239 > Consumer1 97 received Hello World! 240 > Consumer1 97 received Hello World! 241 > Consumer1 97 received Hello World! 242 > Consumer1 97 received Hello World! 243 > Consumer1 97 received Hello World! 244 > Consumer1 97 received Hello World! 245 > > The first part of what's printed out in the example class is the name of > the > consumer. The second part is the ID of the thread and the rest is just the > actual text message itself. The same consumer is using two different > threads. > > > > -- > View this message in context: http://tomee-openejb.979440. > n4.nabble.com/JMSXGroupID-and-TomEE-s-JMS-Connection- > Factory-tp4679868p4679893.html > Sent from the TomEE Users mailing list archive at Nabble.com. >
