[rabbitmq-discuss] LIFO queue

Nagy, Attila bra at fsn.hu
Mon Apr 28 09:22:15 BST 2014


On 04/19/10 13:59, Martin Sustrik wrote:
>> Hi, I'm just learning about messaging and I need to create a LIFO
>> message queue. I looked into it with ApacheMQ and it is apparently not
>> easily possible.
>> Does AMQP/RabbitMQ support LIFO / FILO?
> No. There's no such thing in AMQP. You won't find it even in non-AMQP
> solutions.
> It would be extremely interesting to know a bit more about your use case
> though.
Although the message is quite old -and unanswered-, I can tell you about 
my case:
I collect RADIUS accounting messages via queues for maintaining historic 
data (who used what port/IP) and actual data (who are using them now) too.

Here, data with growing age becomes of less importance in the meaning of 
how quickly it gets processed.
If the queue is FIFO and contains multi million records (due to 
something going bad) and processing it takes a half day, it means for a 
half day, I won't be able to serve actual session data, because they are 
at the tail of the queue, while the processing still happens on its 
head, which is possibly history now.
With a LIFO queue, if the queue grows, history gets into the background 
and actual data in the foreground.
Meaning: the actual data can be served with high possibility, while 
historic data will be eventually processed, which is the desired effect.

Hence, I would need a LIFO queue in RabbitMQ too. :)

More information about the rabbitmq-discuss mailing list