activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <>
Subject Re: Dispatch Policy
Date Tue, 26 Jul 2011 12:17:33 GMT
use strictOrderDispatch on your queue and use a prefetch that is a
little larger than your expected queue depth.
With these settings, the dispatcher will attempt to fill the first
consumers prefetch buffer with all the messages in order.

When strictOrderDispatch=false, the default, it will round robin
across the available consumers on each dispatch, such that consumer 1
gets message 1, consumer 2 message 2 etc. When true, consumer1 gets
0-prefetch, consumer 2 prefetch-2*prefetch etc.

You can also use consumer priority to have some consumers get the bulk
of messages.
See: consumer.priority from

On 24 July 2011 23:12, swathig <> wrote:
> I'm using ServiceMix and activemq broker to transport messages between
> services deployed in ServiceMix. I'm observing a round robining pattern in
> the order in which activemq chooses the concurrent consumers to push the
> messages to. This seems to be the case even when the prefetch is modified to
> 1. I cannot use a prefetch of 0 since I'm using Spring. I've tried changing
> the dispatch policy to Simple Dispatch in the activemq configuration xml but
> I continue to see the same behavior. Is there any way I can configure
> activemq to push a message to the first available consumer (rather than
> round robin through consumers which I guess is the default out of box
> setting for the version of activemq I'm using)?
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at


View raw message