activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahn Nicholas, Bedag" <Nicholas.R...@bedag.ch>
Subject Messages in queue but not consumed
Date Thu, 03 Jul 2014 09:26:34 GMT
We've noticed a problem in our production ActiveMQ 5.8 instances where messages remain in a
queue even when there are active consumers on that queue. Most messages are consumed by the
consumers, but a few do not and remain in the queue. They just seem to be stuck there.  Here's
our setup:

-       2 instances of ActiveMQ 5.8 in a failover (master/slave) setup on linux
-       JDBC (MSSQL) for the message store

I've been able to reproduce this situation manually by doing the following:

1.      Create 2 consumers on a queue.
2.      Run 2 Producers (from 2 separate processes) simultaneously to send 1000 messages each
to the queue.
3.      Use JMX to check the QueueSize of the queue.

Not everytime, but every second or third run of the 2 simultaneous producers, not all of the
2000 messages will be consumed.  When this happens, the consumers are still running and idle,
but the QueueSize is non-zero (can be anything from 1 - 5, usually) and I can see the messages
in the database. The unconsumed messages do not stop later messages from being consumed, however.
A broker restart causes the 'stuck' messages to be immediately sent to the consumers.

It seems to have something to do with the multiple simultaneous producers as running just
1 producer at a time works as normal with all messages consumed. I have tried to create a
self-contained unit test (i.e. vm broker) for this, but was not able to reproduce the situation.
However, a unit test connecting to a remote broker did show the same situation (with many
more stuck messages). That would lead me to guess that the issue is perhaps in the JDBC store
code, but that's just a guess.

Is this a known issue?  Is there any workaround for it? Is it corrected in a version later
than 5.8?

Thanks for the help.
Nick



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message