[rabbitmq-discuss] Priority Queue implementation and performance

Matthew Sackman matthew at rabbitmq.com
Tue Oct 12 20:18:10 BST 2010

On Tue, Oct 12, 2010 at 09:05:33PM +0200, Uwe Dauernheim wrote:
> I stumbled upon the priority queue implementation (priority_queue.erl)
> and was wondering if implementing it as a heap wouldn't increase
> performance, maybe not for the in but for the out? Or are there other
> reasons to keep it like that?

It's deliberately optimised for a very small number of priorities. I
doubt we have any use case with > 5 priorities. It's only used in
gen_server2 where we allow prioritisation of messages.

Note the priority_queue.erl has nothing to do with AMQP priorities which
we don't implement.


More information about the rabbitmq-discuss mailing list