activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From techbuddy <santo...@yahoo-inc.com>
Subject RE: Messages getting dispatched in a single thread
Date Fri, 06 Jan 2012 06:46:22 GMT
Found the culprit. The issue was in the TestCode

The prefetch limit was not getting set correctly. Setting it through the
props file was not happening.
I tried with explicit setting of this property through the following, and
the concurrency worked as expected

*((ActiveMQConnectionFactory)connectionFactory).getPrefetchPolicy().setQueuePrefetch(1);*

I did another negative test by setting the prefetch limit to 10 ( the number
of consumer sessions is 3), and found the processing happening sequentially.


*Take away* : If the prefetch limit is more than 1, AMQ would tend to
dispatch the messages to a single consumer session, even though there are
multiple active consumer sessions (each with a different
MessageConsumer/Listener on the same queue) available.

--
View this message in context: http://activemq.2283324.n4.nabble.com/Messages-getting-dispatched-in-a-single-thread-tp4252635p4268445.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message