[rabbitmq-discuss] Auto delete messages in Queue after queue size reaches a certain number

Maurya M mauryam at live.in
Thu Jul 5 17:55:47 BST 2012

 Setting the "ttl" on the publisher queue does work fine when the consumer also declares the queue with 'ttl' (using Java client tested)

Is it necessary for declaring the consumer queue to hold the configuration of ttl? My requirement is to drop the published messages which are older than X secs. Is there are way to achieve this using a Java publisher and C++ consumer? Appreciate your response.


> Date: Thu, 5 Jul 2012 09:34:45 +0100
> From: matthias at rabbitmq.com
> To: rabbitmq-discuss at lists.rabbitmq.com
> Subject: Re: [rabbitmq-discuss] Auto delete messages in Queue after queue size reaches a certain number
> On 05/07/12 09:06, alvinRMQ wrote:
> > Is there a way for the rabbitMQ broker to automatically throw away messages
> > in a Queue if the number of messages is above a certain number?
> The closest RabbitMQ has to that is per-queue message ttl. See 
> http://www.rabbitmq.com/extensions.html#queue-ttl. That is based on time 
> rather than a count, which is arguably more useful - i.e. one can 
> imagine that an app may not care about messages older than n seconds, 
> whereas it is hard to conceive of an app that doesn't care about 
> messages thrown away from the front (or back?) of the queue based on a 
> count.
> > It is possible that a consumer may not be able to keep up with the
> > publisher, and cause the Rabbit Broker to slowly run out of disk space.
> ...at which point rabbit will block the producers until the consumers 
> have drained enough messages to clear the disk alarm.
> Regards,
> Matthias.
> _______________________________________________
> 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/20120705/1f1e3e5f/attachment.htm>

More information about the rabbitmq-discuss mailing list