On 3 February 2012 10:25, Randall Richard wrote:

Hello Tony, in addition to being notified of binds and unbinds, is there
something equivalent in RabbitMQ that can notify about broker wide activity
such as a connection close?

Sort of, indirectly: there's an exchange called amq.rabbitmq.log that
receives all events that go out to Erlang's SASL logging system. You can
bind to that to receive all the info, warning, error messages etc. You'll
likely then have to do crude text parsing to recover some structure from
each log message, but it ought to be straightforward to get connection
opens and closes.

Regards,
Tony
--
Tony Garnock-Jones
tonygarnockjones at gmail.com
http://homepages.kcbbs.gen.nz/tonyg/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120203/771bce60/attachment.htm>

Search Discussions

  • Tony Garnock-Jones at Feb 3, 2012 at 9:28 pm

    On 3 February 2012 14:42, Randall Richard wrote:

    More specifically, for an application that provides a "presence" status, a
    disconnect is something you want to capture and propagate accordingly. Is
    one approach to do what you describe below (e.g. I could create a
    consumer/service that keeps track of connects and disconnects and associate
    that with a corresponding application context)? Is there something more
    obvious on how this might be done with RabbitMQ?
    Yes, you could do that (though you might have trouble correlating the log
    messages with application-level entities). I don't think there's anything
    much cleaner you could do using the built-in features, though. Stepping
    away from built-ins, the presence exchange would probably simplify things
    in terms of the code you'd need to write, but at the cost of running a
    third-party plugin.

    Regards,
    Tony
    --
    Tony Garnock-Jones
    tonygarnockjones at gmail.com
    http://homepages.kcbbs.gen.nz/tonyg/
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120203/c8a9c6a8/attachment.htm>
  • Simon MacMullen at Feb 8, 2012 at 11:10 am

    On 03/02/12 21:28, Tony Garnock-Jones wrote:
    Yes, you could do that (though you might have trouble correlating the
    log messages with application-level entities). I don't think there's
    anything much cleaner you could do using the built-in features, though.
    Stepping away from built-ins, the presence exchange would probably
    simplify things in terms of the code you'd need to write, but at the
    cost of running a third-party plugin.
    There's also an internal event stream which the management plugin hooks
    into which broadcasts {queue|connection|channel} {created|deleted} events.

    I have sometimes wondered about writing a plugin which just hooks this
    up to an exchange, but I'm not sure how useful such a raw-ish stream
    would be. Anyone?

    Cheers, Simon

    --
    Simon MacMullen
    RabbitMQ, VMware
  • Tony Garnock-Jones at Feb 8, 2012 at 12:46 pm

    On 8 February 2012 06:10, Simon MacMullen wrote:

    I have sometimes wondered about writing a plugin which just hooks this up
    to an exchange, but I'm not sure how useful such a raw-ish stream would be.
    Anyone?
    Better than parsing the Erlang event log, for sure! I wouldn't even make it
    a plugin, I'd make it a core feature, and hook up the monitoring using the
    exchange per se.

    Regards,
    Tony
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120208/ab913d3b/attachment.htm>
  • Randall Richard at Feb 8, 2012 at 1:50 pm
    Having a way for an application/consumer to subscribe to events stemming
    from queue and connection drops would be very useful.

    The management web UI shows this activity, but presumably it's polling the
    http api and updating the screen data (i.e. I'm assuming it's polling
    something because there's a select box "Update: every 5 seconds").

    -Randall
    On Wed, Feb 8, 2012 at 7:46 AM, Tony Garnock-Jones wrote:
    On 8 February 2012 06:10, Simon MacMullen wrote:

    I have sometimes wondered about writing a plugin which just hooks this up
    to an exchange, but I'm not sure how useful such a raw-ish stream would be.
    Anyone?
    Better than parsing the Erlang event log, for sure! I wouldn't even make
    it a plugin, I'd make it a core feature, and hook up the monitoring using
    the exchange per se.

    Regards,
    Tony


    _______________________________________________
    rabbitmq-discuss mailing list
    rabbitmq-discuss at lists.rabbitmq.com
    https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120208/50a50969/attachment.htm>
  • Simon MacMullen at Feb 8, 2012 at 1:54 pm

    On 08/02/12 13:50, Randall Richard wrote:
    Having a way for an application/consumer to subscribe to events stemming
    from queue and connection drops would be very useful.

    The management web UI shows this activity, but presumably it's polling
    the http api and updating the screen data (i.e. I'm assuming it's
    polling something because there's a select box "Update: every 5 seconds").
    Yes, the HTTP API is pure HTTP, no websockets or long polling or whatever.

    I'll see about cooking up such a plugin (sorry Tony, but it would be
    rather experimental at first and I think it's nice to put things in
    plugins where possible). But it's one of a million other things to do...

    Cheers, Simon

    --
    Simon MacMullen
    RabbitMQ, VMware

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedFeb 3, '12 at 6:48p
activeFeb 8, '12 at 1:54p
posts6
users3
websiterabbitmq.com
irc#rabbitmq

People

Translate

site design / logo © 2022 Grokbase