How do I access the queue or binding arguments from plugins or custom exchange types?

I'd like to decide, in a custom exchange, how to route a message based on the queue/binding arguments but I can't see them referenced on the records I have access to in the call to route/2

Will I need to look this up in mnesia or something?

Thanks!

Jon Brisbin

http://jbrisbin.com
Twitter: @j_brisbin

Search Discussions

  • Alvaro Videla at Apr 28, 2011 at 8:03 am
    Hi,

    Actually I'm interested in knowing the same thing.

    Is there a way we could do the get the Queues Pids from the route/2 function?

    Regards,

    Alvaro
    On Apr 27, 2011, at 7:00 PM, Jon Brisbin wrote:

    How do I access the queue or binding arguments from plugins or custom exchange types?

    I'd like to decide, in a custom exchange, how to route a message based on the queue/binding arguments but I can't see them referenced on the records I have access to in the call to route/2

    Will I need to look this up in mnesia or something?

    Thanks!

    Jon Brisbin

    http://jbrisbin.com
    Twitter: @j_brisbin


    _______________________________________________
    rabbitmq-discuss mailing list
    rabbitmq-discuss at lists.rabbitmq.com
    https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
    Sent form my Nokia 1100
  • Matthew Sackman at May 13, 2011 at 11:26 am

    On Wed, Apr 27, 2011 at 12:00:46PM -0500, Jon Brisbin wrote:
    How do I access the queue or binding arguments from plugins
    Plugins: you can't - plugins mainly just use the erlang client and are
    generally normal client programs which happen to be running in the same
    Erlang VM as Rabbit. Or, they use some other defined API such as
    or custom exchange types?
    amqqueue:with/{2,3} is probably what you're after: from there you can
    get the #amqqueue record, which contains arguments.

    binding:list_for_source/1, binding:list_for_destination/1 et al are what
    you want for bindings. From the results, you'll have a list of #binding
    records, which contain args.
    Will I need to look this up in mnesia or something?
    Yes, but don't do so directly. Use the APIs we provide.

    Matthew

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedApr 27, '11 at 5:00p
activeMay 13, '11 at 11:26a
posts3
users3
websiterabbitmq.com
irc#rabbitmq

People

Translate

site design / logo © 2022 Grokbase