activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <>
Subject Re: how to configure a competing consumers Queue
Date Tue, 13 Dec 2016 13:51:01 GMT
ActiveMQ only round-robins when consumers have available space in their
respective prefetch buffers.  Once all consumers have full prefetch
buffers, the broker will dispatch the next message to whichever consumer
creates available space in their prefetch buffer by consuming a message,
resulting in competing consumers.

So the key to achieving what you want is to set each consumer's prefetch
buffer very small (to zero, for strict competing consumers, or to a small
number such as 1, if you need the performance benefits that prefetch can
provide in certain circumstances such as a high-latency network) so the
broker follows the competing consumers paradigm as soon as possible.


On Dec 10, 2016 12:53 PM, "Steve" <> wrote:


I am new to ActiveMQ.  I notice that the broker seems to use a round-robing
algorithm for distributed messages to different consumers on a given queue.
I am interested in using a competing-consumers algorithm for the
distribution instead if possible.  I found a mention of this in the
associated Camel docs here:

I don't understand the configuration details in the example however.

Thanks in advance,

View this message in context: http://activemq.2283324.n4.
Sent from the ActiveMQ - User mailing list archive at

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