[rabbitmq-discuss] Queue with auto_delete=True not getting deleted

Matthias Radestock matthias at rabbitmq.com
Mon Feb 28 18:09:36 GMT 2011


On 28/02/11 17:57, Michi Oshima wrote:
> I'm wondering if there is a way to ensure deletion.  I cannot use set
> exclusive to True, as I have to let another client process bind the queue.
> I'm using a .NET client to create a queue thusly:
>      channel.QueueDeclare(qname, false, false, true, null); // channel is
> IModel.
> That is: durable=False, exclusive=False, auto_delete=True.
> I'm finding that the queue does not get deleted when I terminate the .NET
> client process immediately after I declare the queue.
> On the other hand, if the client process is terminated after the queue is
> bound, the queue gets deleted properly.

Auto-deletion kicks in when the last consumer has been removed. But for 
that to happen there must be a consumer to start with.

You may want to set a lease on the queue. See 



More information about the rabbitmq-discuss mailing list