[rabbitmq-discuss] Question about RabbitMQ "Presence Exchange" Plugin

Tony Garnock-Jones tonygarnockjones+rabbitmq at gmail.com
Fri Feb 3 13:12:14 GMT 2012

On 3 February 2012 06:09, Emile Joubert <emile at rabbitmq.com> wrote:

> On 03/02/12 09:35, Liuzhuofu wrote:
> > 1. What's the behavier of "x-presence" like? direct, fanout or topic?
> None of those: the presence exchange is a different kind of exchange
> that drops messages that are published to it. Instead it generates
> messages when queues bind and unbind.

There's also more detailed discussion of this in the README,

> > 2. One "x-presence" exchange can only get the event that the binding
> > changes on this exchanges, other bindings on other exchanges, it can not
> > monitor, am I right?
> It only produces notifications of binding on the local exchange, not
> other exchanges.

For the avoidance of doubt, this should get you to where you need to be:
clients, when they connect, should bind a temporary (autodelete) queue to a
distinguished presence exchange for your application. If they crash, suffer
heartbeat failure, or otherwise disconnect, the temporary queue will be
deleted, and as a consequence the binding to the presence exchange will be
removed, the fact of which will then be broadcast to the presence listeners
attached to that exchange.

Tony Garnock-Jones
tonygarnockjones at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120203/2e246b36/attachment.htm>

More information about the rabbitmq-discuss mailing list