There is nothing built-in, but you could implement a custom exchange
type for this.
The basic idea is that a client, after connecting, creates an exclusive
queue and binds it to an exchange of the custom exchange type. Due to
the exclusivity, the queue and hence the binding will get removed when
the connection is closed. The exchange sees both the bind and unbind
events and can publish notification messages when it gets them.
See https://github.com/tonyg/presence-exchange for an exchange type that
does s.t. like that. Warning: this may need some tweaking to get to work
with recent versions of RabbitMQ.
Regards,
Matthias.
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq...@lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
On 15/11/11 00:26, Kilian C. wrote:
> actually i am using https://github.com/postwait/node-amqp (nodejs)
> the only way is to write a custom exchange? the topic exchange doesn't
> have the bind/unbind event?
>
> i am not so good at erlang :)
You could implement everything via an external exchange without needing
to touch Erlang: https://github.com/rabbitmq/rabbitmq-external-exchange.
Just a brief note, I got it working few months ago:
https://github.com/majek/rabbitmq-x-presence
Again, things might have changed since then and the code may
require some minor changes, but at least it should be easier to
get it working.
Cheers,
Marek
This postdates the serialise_events change so it should be as good as it
ever was.
I wonder about importing this into public-umbrella. Hmm.
Cheers, Simon
--
Simon MacMullen
RabbitMQ, VMware