[rabbitmq-discuss] Priority Queue

Tony Garnock-Jones tonygarnockjones+rabbitmq at gmail.com
Wed Dec 28 18:45:47 GMT 2011


Hi Dhaneesh,

I got most-of-the-way through writing up a blog post describing how to do
this before I found I'd been handily beaten to the punch: Doug Barth's post
at
http://dougbarth.github.com/2011/07/01/approximating-priority-with-rabbitmq.htmldoes
a good job of explaining one solid way of achieving basic message
prioritisation.

The key insight is to *make sure higher-priority messages never get stuck
behind lower-priority messages*. This manifests in a few ways:

   - the creation of multiple queues, avoiding getting stuck behind
   low-priority messages in a single queue
   - the creation of multiple channels (or even connections!), avoiding
   getting stuck behind messages travelling on a single TCP link
   - the creation of multiple in-memory queue objects on the client side,
   avoiding gettings stuck behind messages in a single in-memory queue object
   - careful attention to the approach taken to removing messages from the
   in-memory queues: every time a message is needed, check the
   highest-priority queue first.

Basically, provide ways for messages to overtake each other as required,
and then always check the fast-path first.

Regards,
  Tony


On 28 December 2011 01:58, Dhaneesh Radhakrishnan <dhaneesh at hifx.co.in>wrote:

> Hi
>
> We are implementing RabbitMQ queues for an application that has
> to asynchronously handle a number of jobs
>
> we need to know whether rabbitmq support the priority queue
>
> Any pointers for more information about it would be highly appreciated.
>
> Thanks and Regards
> Dhaneesh R
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>


-- 
Tony Garnock-Jones
tonygarnockjones at gmail.com
http://homepages.kcbbs.gen.nz/tonyg/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20111228/647dfb6f/attachment.htm>


More information about the rabbitmq-discuss mailing list