activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <>
Subject Re: Question about Multiple Consumers / Same Queue
Date Fri, 05 Apr 2013 11:39:59 GMT
the broker does round robin dispatch and by default will push 1000 messages
to each consumer without an ack. That is the default prefetch value.

configure a prefetch of 0 and messages will remain with the broker until a
consumer asks for them.

there is also a strict order dispatch mode (alternative to round robin)
where a consumer with prefetch 10 could get all messages 1-10, with 11
going to the next consumer.
so they get all messages in order till their prefetch limit is reached.

On 5 April 2013 00:59, SledgeHammer <> wrote:

> Brand new to ActiveMQ and enterprise queues in general, but I am trying
> this
> out for a new project. Working in C#.
> Set up 2 console apps. One (AppA) sends 1000 messages to the TEST queue and
> then waits for responses. The other one is the "consumer" (AppB). Listens
> to
> the TEST queue and processes messages.
> For testing, I ran 2 copies of AppB. In the stock set up, AppB-1 processed
> msgs 1,3,5,7,9,etc. and AppB-2 processed 2,4,6,8,10,etc.
> I added a variable thread sleep to simulate our real world environment.
> AppB-1 sleeps 100ms before responding and AppB-2 sleeps 2000ms before
> responding.
> Unfortunately, AppB-1 still only gets 1,3,5,7,9 and AppB-2 still only gets
> 2,4,6,8,10,etc.
> Since the -1 instance is simulating working much faster, I'd like it to
> pick
> up the slack for the slower AppB-2 consumer.
> How do I do something like that? Seems like its just going round robin.
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at


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