[rabbitmq-discuss] LIFO queue
Laing, Michael
michael.laing at nytimes.com
Tue Apr 29 11:19:57 BST 2014
We do LIFO external to RabbitMQ with Cassandra. We ttl the data and never
explicitly delete - we're interested mostly in the recent stuff so we do
queries like 'give me the latest 200'. It's fast and we handle jillions of
messages.
You can use redis for this too, I believe, tho I am not sure about ttl.
Or you could tinker with zmq.
Good luck,
Michael
On Tue, Apr 29, 2014 at 5:55 AM, Simon MacMullen <simon at rabbitmq.com> wrote:
> 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
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140429/a6893f5f/attachment.html>
More information about the rabbitmq-discuss
mailing list