On 6/18/07, jcm231 <[EMAIL PROTECTED]> 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.
http://activemq.apache.org/what-is-the-prefetch-limit-for.html

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


--
James
-------
http://macstrac.blogspot.com/

Reply via email to