[rabbitmq-discuss] Can a queue auto_delete if it doesn't have a consumer when created?

Bill Moseley moseley at hank.org
Sat Jan 8 01:40:57 GMT 2011


This is not a classic reply queue setup where only two processes are
involved.  I have three processes involved here:

In one process I've created a "reply queue" with auto_delete true and I bind
it to an exchange (using the queue's name as the routing key).  I then
publish a message and include the reply queue's name in "reply_to" property
-- I'm passing the routing key to another process it can use for replying.

The consumer picks up that message off a queue and then publishes a new
message (the "reply") to the reply queue using the routing key provided.

Finally, in a third process that knows the reply queue's name a
"amqp_basic_get" is used to consume from reply queue.  This process now has
the "reply" message.  This is working as expected.

But, when that's all done the queue is still around:

$ sudo rabbitmqctl -q list_queues name messages consumers auto_delete
amq.gen-tYjOPWR6ZV0crLn5ga5KZg==        0       0       true

So, there's no consumers on the queue, and it's flagged auto_delete.  An I
misunderstanding how auto_delete works on queues?

Is the problem that when I created the "amq.gen-tYjOPWR6ZV0crLn5ga5KZg== "
queue that there were no consumers so the queue will never get deleted?

Is using "x-expires" the solution?

-- 
Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110107/6124c4d2/attachment.htm>


More information about the rabbitmq-discuss mailing list