activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wojtek.z" <>
Subject Retrieving Messages Out of Sequence
Date Mon, 17 Sep 2007 21:47:07 GMT


We are currently experiencing a bit of a problem with one of our
applications which relates to messages being retrieved from the queue not in
order / sequence.

The basic idea is as follows

We create 3 sets of messages
Each message is tagged to a unique group
Each message is tagged with a sequence number of 1 - 3
Each message is sent to the queue separately

Now when we view the queue the messages are lined up in order ( ie Group A =
1 , 2 , 3 )

When we retrieve the messages though there is a very high chance that the
messages dont come off the queue in the order they were put on there. If we
have to sets of 3 messages ( from group A / B ) they tend to come across
along the lines of A1 , B1 , A3 , B3 , A2 , B2. Now sometimes they shuffle
around sometimes they come of the queue properly ( mostly only when 1 set of
messages is active any more then that and the order breaks )

The way we retrieve the messages is also very simple, we simply poll the
queue and grab each message one by one.

I did some reading and there were a few bugs reported back in version 4.0.x
that mentioned these problems. I tried this exercise with versions 4.0.1 and
4.1.1 and neither seem to work correctly.

Is there a work around to this problem or maybe I am just doing something
very silly that is causing this. Anyway if someone could let me know that
would be most beneficial. Thanks !
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message