[rabbitmq-discuss] 答复: A question about RabbitMQ "Presence Exchange" Plugin

Marek Majkowski majek04 at gmail.com
Wed Feb 8 14:04:04 GMT 2012


2012/2/8 Liuzhuofu <liuzhuofu at huawei.com>:
> Hi, Marek:
> I think you didn't catch my point.
> My question is : If a queue bind to a 'x-presence' exchange with a
> "not_empty" key and it hasn't bean subscribe by a process, when the vm of
> queue exit , the exchange can not receive a "unbind" message for the queue.
> But if the queue bind to 'x-presence' exchange with a "not_empty" key and it
> has subscribe by a process, when the vm of queue exit, the exchange can
> receive a "unbind" message for the queue.

What kind of queue do you have in mind? durable or exclusive or auto_delete?

You should see an 'unbind' message on a presence exchange,
when a queue gets unbind from this exchange

A queue can get 'unbind' during one of the following events:
 - you manually call 'unbind'
 - a queue gets deleted

The latter case, a queue getting deleted can happen in following cases:
 - you manually call queue_delete
 - a queue is 'exclusive' and a connection that created it gets closed
 - a queue is 'auto-delete' and all the consumers stopped consuming (for example
   last consumer connection got closed)

Please review the AMQP spec for details:
  http://www.rabbitmq.com/amqp-0-9-1-reference.html#queue.declare


Cheers,
   Marek


More information about the rabbitmq-discuss mailing list