activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Fernandez <>
Subject Re: How can avoid that the broker master loadbalance messages equitably between two brokers ?
Date Thu, 27 May 2010 18:13:46 GMT

Try using consumer prioritization.

>From the web page - 

"The way it works is that the broker will simply order any queue consumers
according to their priorities and send messages to the highest priority
consumers first. Once a particular consumer has its prefetch buffer filled
up, the broker will begin to dispatch messages to consumers of lower

I have tried this across a 2-broker NoB and it seems to work fine. 

So what you want to do is assign the fast consumer on  br2 a higher
priority. Messages will then be dispatched to the fast consumer until its
prefetch limit has been reached (i.e., the fast consumer becomes a slow
consumer); at which time, the messages will then begin flowing to the
low-priority consumer on br1. Messages will again flow to the fast consumer
as soon as it addresses its prefetch limit issue.     

ActiveMQ Ref Guide -

cmoulliard wrote:
> Hi,
> I would like to know if it is possible when we have created a bridge
> between two brokers (br1 and br2) and where we have a fast consumer
> connected on br2 and a slow on br1 that the broker br1 send more messages
> to the br2 instead to balance them equitably ?
> For the moment, If I produce 500 messages, 250 messages will be consumed
> by the fast consumer and 250 by the slow. Normally the fast consumer
> should receive more messages !!
> Kind regards,
> Charles 

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message