<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Matthias,<br>&nbsp;Setting the "ttl" on the publisher queue does work fine when the consumer also declares the queue with 'ttl' (using Java client tested)<br><br><div align="left">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.<br></div><br>Thnx,<br>Maurya<br><br><div><div id="SkyDrivePlaceholder"></div>&gt; Date: Thu, 5 Jul 2012 09:34:45 +0100<br>&gt; From: matthias@rabbitmq.com<br>&gt; To: rabbitmq-discuss@lists.rabbitmq.com<br>&gt; Subject: Re: [rabbitmq-discuss] Auto delete messages in Queue after queue size reaches a certain number<br>&gt; <br>&gt; On 05/07/12 09:06, alvinRMQ wrote:<br>&gt; &gt; Is there a way for the rabbitMQ broker to automatically throw away messages<br>&gt; &gt; in a Queue if the number of messages is above a certain number?<br>&gt; <br>&gt; The closest RabbitMQ has to that is per-queue message ttl. See <br>&gt; http://www.rabbitmq.com/extensions.html#queue-ttl. That is based on time <br>&gt; rather than a count, which is arguably more useful - i.e. one can <br>&gt; imagine that an app may not care about messages older than n seconds, <br>&gt; whereas it is hard to conceive of an app that doesn't care about <br>&gt; messages thrown away from the front (or back?) of the queue based on a <br>&gt; count.<br>&gt; <br>&gt; &gt; It is possible that a consumer may not be able to keep up with the<br>&gt; &gt; publisher, and cause the Rabbit Broker to slowly run out of disk space.<br>&gt; <br>&gt; ...at which point rabbit will block the producers until the consumers <br>&gt; have drained enough messages to clear the disk alarm.<br>&gt; <br>&gt; Regards,<br>&gt; <br>&gt; Matthias.<br>&gt; _______________________________________________<br>&gt; rabbitmq-discuss mailing list<br>&gt; rabbitmq-discuss@lists.rabbitmq.com<br>&gt; https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss<br></div>                                               </div></body>
</html>