[rabbitmq-discuss] Priority Queue

Matthew Sackman matthew at rabbitmq.com
Wed Dec 28 11:02:56 GMT 2011


Hi,

On Wed, Dec 28, 2011 at 12:28:17PM +0530, Dhaneesh Radhakrishnan wrote:
> we need to know whether rabbitmq support the priority queue

Nope, we don't support it. There are various ways to simulate it - eg by
using multiple queues, but it's actually quite fiddly to get right -
whilst you can easily route messages of different priorities to
different queues, getting the consumers to receive messages only from
the "highest" priority queue with available msgs is quite tricky -
especially doing it efficiently.

Work/job queuing with priorities is quite a specialist (though not
uncommon) messaging pattern. If you're not doing high message throughput
then you might find just doing basic.gets down each of the queues works
well enough - and then start again once you get a message and process
it.

Matthew


More information about the rabbitmq-discuss mailing list