Aysnc ActiveMQ Message consumer unable to consume messages
I am using a an Async Message Consumer in ActiveMQ. My Producer works just fine and send message to the Queue. Now, my async message consumer is just waiting for the onMessage() to be called on, which never happens. So, the problem is: Messages are not consumed by the Async Consumer. Messages get piled up in the pending messages for the Queue. Snapshot of the ActiveMQ log also shows a lot of messages just piled up in the pending state: 2015-08-31 09:54:45,331 | DEBUG | queue://SampleQ1, subscriptions=0, memory=0%, size=517, pending=0 <b>toPageIn</b>: 78, Inflight: 0, <b>pagedInMessages.size</b> 439, <b>pagedInPendingDispatch.size</b> 438, enqueueCount: 529, dequeueCount: 12, memUsage:2971237 | org.apache.activemq.broker.region.Queue | Queue:SampleQ1 I am unable to figure out where exactly the problem lies. The counts: toPageIn 78 pagedInMessages.size 439 pagedInPendingDispatch.size 438 just keeps on increasing and messages remain undelivered to the consumer. Is it a server side problem or a client side ?
Browsing over the ActiveMQ bug list came across a bug that was quite similiar to what I experienced. https://issues.apache.org/jira/browse/AMQ-2955 Summarizing, my Queue was unable to deliver messages to my async consumers at random instance in time. Once this event occurs I find a built up of messages in the pending messages and a mismatch in the count of messages enqueued vs messages dequeued. The bug as mentioned in the link talks of the kahaDB for persistent storage going in some inconsistent state causing message delivery to a standstill. As mentioned in the bug analysis, the ActiveMQ configuration in activemq.xml solves the problem. <!--policyEntry queue=">" producerFlowControl="false" memoryLimit="1mb" useCache="false"> </policyEntry-->
Apache Camel inOut routes, out exchange marshaling/unmarshaling with jaxb
STOMP Protocol - Session ID Questions
What solution should I use for this webapp with websockets. ActiveMQ?
NIO disadvantages in ActiveMQ
How can I programatically purge an ActiveMQ queue using the Apache.NMS API?
Using Camel to transparently log messages from queue
ActiveMQ and JMS : Basic steps for novice
URL Encoding a Camel Exchange Body
Where can I download ActiveMQ Source Distributions?
activemq embedded broker
How to debug ActiveMQ client?
activemq java version
When there are multiple consumers of a queue in ActiveMQ, are they all delivered the same messages as they arrive on the queue?
ReceiveNoWait doesn't work with Apache.NMS & ActiveMQ
How do you replay KahaDB message archives?
configure the broker