Reputation: 1592
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:
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:
just keeps on increasing and messages remain undelivered to the consumer.
Is it a server side problem or a client side ?
Upvotes: 2
Views: 2701
Reputation: 1592
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-->
Upvotes: 1