activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Black" <>
Subject RE: Is this possible with ActiveMQ?
Date Thu, 25 Apr 2013 21:30:27 GMT
You have another problem with priorities.  If the priorities swamp the
system the low priority ones will never fire so you just reverse the problem
of starving the low priority.

Use one queue for each producer.

You just have to communicate the queue names to the consumers if your
producers are dynamic but that shouldn't be hard to do.

Then you have a consumer thread for each producer and you'll get a near
perfect round-robin effect just like your boss wants.

-----Original Message-----
From: SledgeHammer [] 
Sent: Thursday, April 25, 2013 4:27 PM
Subject: Re: Is this possible with ActiveMQ?

I understand we have the 9 priorities... so my original plan to intersperse
the messages was to pick a random priority between 0 & 9 and assign that to
the message. In the long term, that should be an even distribution among
producers. My boss however complained that probably 1 ProducerB message will
get a 1 and 14k ProducerA messages will get a 1, but 85k ProducerA messages
will get a higher priority. So ProducerB will have to wait for over 85k
messages to be processed before it gets to that one last message. Thats the
issue we were trying to solve.

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

View raw message