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 [mailto:gro...@firstam.com] 
Sent: Thursday, April 25, 2013 4:27 PM
To: users@activemq.apache.org
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:
http://activemq.2283324.n4.nabble.com/Is-this-possible-with-ActiveMQ-tp46662
19p4666223.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to