I'm using PoolingConnectionFactory on ActiveMQ. I'm running into some strange problems where the message on the queues are not getting consumed. Say there are 10 queues and a message is moving from Queue 1 -> Queue 2 and so on. After some point say Queue3, the message is no longer getting consumed. When I re-run the Junit test, the message gets picked up and moves onto say Queue6 and then stops. I can't seem to figure out what's going on. I did enable TRACE on the logs and looked quite a bit. I'd really appreciate any thoughts. Thanks.
When I tested with Spring's org.springframework.jms.connection.CachingConnectionFactory, it seems to work fine.
<bean id="connectionFactory" class="bitronix.tm.resource.jms.PoolingConnectionFactory" init-method="init" destroy-method="close">
<property name="className" value="org.apache.activemq.ActiveMQXAConnectionFactory" />
<property name="uniqueName" value="activemq" />
<property name="minPoolSize" value="1" />
<property name="maxPoolSize" value="2" />
<property name="allowLocalTransactions" value="false" />
BTM 2.1.1, Spring Integration 2.0.4, Spring 3.0.
Just an Update:
While I'm still working on fixing this issue, I noticed that when I set both the minPoolSize and maxPoolSize to 1, the messages are being read off of the Queue nicely as expected. Any value of maxPoolSize > 1 is causing a problem. I tested it at least a dozen times just to make sure that my findings were accurate. Any thoughts on why this may be happening? Thanks.
The problem certainly lies somwhere in ActiveMQ's code.
You may try tuning the Spring DefaultMessageListenerContainer (it caching can confuse ActiveMQ a lot) and maybe disable BTM PoolingDataSource's cacheProducersConsumers property as well.
Other than that, I can only recommend you to use a different JMS server with a better working XA support, or to eventually try LRC.
2011/10/4 Kiwiland <[hidden email]>
Thank you so much for your response, I appreciate it. I did try the LRC and it worked fine, but it's probably not something we'd end up using in the long run. We may need to talk to multiple MQ servers, so LRC wouldn't work. May be, I'll start looking at other messaging servers :-)
For the record, we're quite happy with HornetQ.
On Fri, Oct 7, 2011 at 11:01 AM, Kiwiland <[hidden email]> wrote:
|Free forum by Nabble||Edit this page|