activemq


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-->

Related Links

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

Categories

HOME
visual-studio
lambda
yaml
tcsh
code-formatting
visual-studio-2010
mirc
phpmqtt
telegraf
kurento
roku
msmq
jpa-2.0
web-deployment
playframework-2.0
cpu-usage
bosun
conda
websphere-portal
cellular-network
bonita
basic-authentication
splunk-query
amazon-iam
dotcms
nsmutablearray
counting
android-canvas
db2-luw
dreamfactory
xerces-c
jslint
flowchart
fluid-mac-app-engine
react-intl
libreoffice-writer
gestures
simple-schema
lvalue
kendo-treeview
openerp-6
gapi
mathjs
openquery
strpos
gulp-uglify
flipclock
sqlbase
abstract-factory
debug-symbols
directorysearcher
lifetime
cakephp-2.2
image-rotation
nidaqmx
coding-efficiency
nachos
air-native-extension
flipboard
assetic
particle-swarm
rautomation
quickgraph
blobstorage
delphi-xe4
oembed
2d-vector
user-forums
cgrectmake
jquery-dialog
getopt-long
image-scanner
firebird1.5
servercontrol
haiku
page-curl
jquery-1.4
dip
eaccelerator
explicit
oracle-pro-c
rational-unified-process
subtext
code-camp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App