activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Problem with message groups
Date Tue, 19 Jun 2007 03:59:21 GMT
On 6/18/07, jcm231 <> wrote:
> Hi!
> I am have a standalone ActiveMQ server and I am sending messages using a
> producer. The messages include the JMSXGroupID header with two different
> values: "one" and "two". I launch two Consumer objects, both being threads
> and implementing the interface MesageListener. The result is that only one
> of the two consumers receives all the messages. Sometimes is the first
> consumer and sometimes is the second who receives them all.
> What am I doing wrong? It is the first time I use ActiveMQ and I would thank
> any help anybody could give me.

We don't yet guarrentee an exact round-robin dispatch policy on a per
message group basis; consumers tend to eagerly grab as many messages
as will fit into their pre-fetch buffer.

to mimick round-robin, try setting the prefetch to 1 on both
consumers; or try using thousands of messages


View raw message