[rabbitmq-discuss] LIFO queue
Simon MacMullen
simon at rabbitmq.com
Tue Apr 29 10:55:31 BST 2014
On 29/04/2014 10:27, Nagy, Attila wrote:
> Sadly, to be somewhat useful, it will be much uglier and more complex
> than a LIFO queue.
Oh, of course.
> Is this much harder to implement on the server side, or you don't see
> enough interest?
Bit of both. We've had a lot more requests for priority queues than LIFO
over the years, and we're only just starting to work on them. LIFO seems
like a pretty obscure request with only two people asking in 4 years I'm
afraid.
And it's not completely obvious how to implement it; if you wanted to do
it in terms of the existing queue implementation you'd have the problem
that it's designed to move queues through to the head; that one way
movement is a fairly big assumption (and it's more code than you would
think - due to persistence and paging large parts of the queue may not
be in memory at any given time).
Or you could do a new implementation; the in-memory version would be
trivial but then you'd have to do persistence from scratch if you wanted
it; also not very appealing. Or you could back to SQL or whatever;
performance would be poor but you'd be able to do all sorts of
random-access things and LIFO would fall out very easily.
But these are all quite big tasks I'm afraid.
Cheers, Simon
More information about the rabbitmq-discuss
mailing list