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-->
How to configure the default ActiveMQ in tomEE
Ruby Stomp Gem #publish seems to truncate messages to 256 characters?
ActiveMQ: how can I deliver all messages in a queue to many consumers?
ActiveMQ broker redelivery vs consumer redelivery
Unable to define correct authorization rules… topic://ActiveMQ.Advisory.Producer.Queue.Q1
Spring web-socket message size
schedule moving of messages from activemq DLQ to another queue in ActiveMQ
Use ActiveMQ 5 and IBM MQ 8 in the same application
ActiveMQ performance for producing persistent text messages
active mq and spring jmstemplate how to properly shut down
How provide reliability of ActiveMQ broker?
XA transaction across two separate resource managers/XAResource's
How can I configure a static network of TomEE embedded ActiveMQ brokers so that clients can communicate?
How to enforce user permissions in hawtio for standalone activemq
How are subscribers maintained in case of topic based distributed messaging
Failover for Blob transfer in ActiveMq