[rabbitmq-discuss] Queue Lease (x-expires)

Steve Powell steve at rabbitmq.com
Fri Jan 20 14:25:35 GMT 2012


Just a thought,

If you go the way Simon says and have something from outside poking the mgmt API
every few minutes, make sure you issue queueDelete with the if-empty bit set. 
There is a window between the poking and the deleting in which messages may
arrive on the queue (i.e. it's not idle anymore), and it may even not be in-use
(have consumers) by the time you get to it.

Steve Powell
steve at rabbitmq.com
[wrk: +44-2380-111-528] [mob: +44-7815-838-558]

On 20 Jan 2012, at 12:47, Simon MacMullen wrote:

> On 16/01/12 15:56, Yogesh Ketkar wrote:
>> I would like to delete the queue with no messages in it and so asked
>> the question.
> 
> I see.
> 
>> Can you suggest an alternative to achieve
>> 1. Delete the queue when last event processed from the queue has
>> <Action>Delete</Action>  as this implies that
>>    no more events with same<AppId>  would ever get created.
> 
> Well, you could have your client do that.
> 
>> 2. Delete the queue when it is IDLE for certain period, meaning it is
>> empty and no more event was added to it for certain time period.
> 
> Hmm. Well there's nothing built in to do this, but you could have something from outside poking the mgmt API every few minutes - look at the output of (e.g.)
> 
> rabbitmqadmin list queues name messages consumers idle_since
> 
> Cheers, Simon
> 
> -- 
> Simon MacMullen
> RabbitMQ, VMware
> _______________________________________________
> 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/20120120/bd7c1ad6/attachment.htm>


More information about the rabbitmq-discuss mailing list