[rabbitmq-discuss] Fwd: Queues and auto_delete
0x6e6562 at gmail.com
Thu Aug 6 22:00:46 BST 2009
---------- Forwarded message ----------
From: Garrett Smith <g at rre.tt>
Date: Thu, Aug 6, 2009 at 8:54 PM
Subject: Re: [rabbitmq-discuss] Queues and auto_delete
To: Ben Hood <0x6e6562 at gmail.com>
On Thu, Aug 6, 2009 at 2:10 PM, Ben Hood<0x6e6562 at gmail.com> wrote:
>> Also, queues where auto_delete = true seems to be deleted
>> *immediately* after the last channel is closed. IIRC, the broker
>> should wait for a period of time to allow clients to disconnect and
>> reconnect without losing messages.
> This is what the spec says about autodelete:
> "If set, the queue is deleted when all consumers have finished using
> it. Last consumer can be cancelled either explicitly or because its
> channel is closed. If there was no consumer ever on the queue, it
> won't be deleted."
This is what I'm referring to (from amqp-xml-doc0-8.pdf):
"amq_queue_02 The server SHOULD allow for a reasonable delay between
the point when it determines that a queue is not being used (or no
longer used), and the point when it deletes the queue. At the least it
must allow a client to create a queue and then create a consumer to
read from it, with a small but non zero delay between these two
actions. The server should equally allow for clients that may be
disconnected prematurely, and wish to reconsume from the same queue
without losing messages. We would recommend a configurable timeout,
with a suitable default value being one minute."
I understand this is a "should", but it seems to me a useful recommendation.
If a client gets (unpredictably) disconnected (e.g. a brief network
problem), the current implementation would immediately delete the
I'm switching over from qpid (which does provide a delay before
auto-deleting) so am trying to sort through any redesigns I'll need.
Sounds like I'll want to set auto-delete to false and explicitly
handle queue deletion from the clients.
More information about the rabbitmq-discuss