Hi there,

RabbitMQ implemented exchange bindings as an extension to the AMQP
protocol. However, I couldn't find detailed documentation about it.

The function is declared as:
def exchange_bind(self, callback=None, ticket=0, destination=None,
source=None, routing_key='', nowait=False, arguments={}):

My questions are:
1. In the function definition, what does the argument "ticket" mean, and
how to use it?
2. What is the set of arguments for "arguments = {}"?

It'd be great if someone could explain with examples. Thanks heaps!

Cheers,

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120111/72a56983/attachment.htm>

Search Discussions

  • Jerry Kuch at Jan 11, 2012 at 1:56 am
    Hi, Brian...

    Apologies if I'm not quite reading you correctly. Do you mean
    *exchange-to-exchange* bindings as appeared in 2.1.1? Which
    client(s) are you trying to get them working with? Your snippet
    looks Ruby-ish?

    Best regards,
    Jerry

    ----- Original Message -----
    From: "Brian Jing" <brian.newsgroup at gmail.com>
    To: rabbitmq-discuss at lists.rabbitmq.com
    Sent: Tuesday, January 10, 2012 5:31:25 PM
    Subject: [rabbitmq-discuss] About exchange bindings


    Hi there,

    RabbitMQ implemented exchange bindings as an extension to the AMQP protocol. However, I couldn't find detailed documentation about it.

    The function is declared as:
    def exchange_bind(self, callback=None, ticket=0, destination=None, source=None, routing_key='', nowait=False, arguments={}):

    My questions are:
    1. In the function definition, what does the argument "ticket" mean, and how to use it?
    2. What is the set of arguments for "arguments = {}"?

    It'd be great if someone could explain with examples. Thanks heaps!

    Cheers,

    Brian



    _______________________________________________
    rabbitmq-discuss mailing list
    rabbitmq-discuss at lists.rabbitmq.com
    https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
  • Brian Jing at Jan 11, 2012 at 2:14 am
    Hi Jerry,

    Thanks for your reply!

    And sorry about the confusion. I was talking about exchange to exchange
    binding. I'm using Pika (python client lib).

    This following code declares two exchanges and bind them together. What I
    don't understand is the second argument of the function call
    "exchange_bind". It's called "ticket", and is defaulted to 0. Have no idea
    what it means, though it works without any problems.

    channel.exchange_declare(exchange='broadcast',
    type='fanout')
    channel.exchange_declare(exchange='main',
    type='direct')
    channel.exchange_bind(None, 0, "broadcast", "main", "toABD")

    Cheers,

    Brian
    On Wed, Jan 11, 2012 at 12:56 PM, Jerry Kuch wrote:

    Hi, Brian...

    Apologies if I'm not quite reading you correctly. Do you mean
    *exchange-to-exchange* bindings as appeared in 2.1.1? Which
    client(s) are you trying to get them working with? Your snippet
    looks Ruby-ish?

    Best regards,
    Jerry

    ----- Original Message -----
    From: "Brian Jing" <brian.newsgroup at gmail.com>
    To: rabbitmq-discuss at lists.rabbitmq.com
    Sent: Tuesday, January 10, 2012 5:31:25 PM
    Subject: [rabbitmq-discuss] About exchange bindings


    Hi there,

    RabbitMQ implemented exchange bindings as an extension to the AMQP
    protocol. However, I couldn't find detailed documentation about it.

    The function is declared as:
    def exchange_bind(self, callback=None, ticket=0, destination=None,
    source=None, routing_key='', nowait=False, arguments={}):

    My questions are:
    1. In the function definition, what does the argument "ticket" mean, and
    how to use it?
    2. What is the set of arguments for "arguments = {}"?

    It'd be great if someone could explain with examples. Thanks heaps!

    Cheers,

    Brian



    _______________________________________________
    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/20120111/1936df28/attachment.htm>
  • Michael Bridgen at Jan 11, 2012 at 9:39 am

    My questions are:
    1. In the function definition, what does the argument "ticket" mean, and
    how to use it?
    It's a throwback to AMQP 0-8 that was removed in AMQP 0-9-1 (I don't
    know why it's in an API). Just let it default to 0.
    2. What is the set of arguments for "arguments = {}"?
    Generally, none. It's an extension mechanism in AMQP, and usually left
    alone. Aside from vendor extensions, the only reason for ever using it
    is for a binding to a headers exchange, which encodes its match values
    in the 'arguments' field.

    -Michael



    _______________________________________________
    rabbitmq-discuss mailing list
    rabbitmq-discuss at lists.rabbitmq.com
    https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
  • Brian Jing at Jan 12, 2012 at 1:25 am
    Thanks Michael for your explanation! Very much appreciated!

    Cheers,

    Brian
    On Wed, Jan 11, 2012 at 8:39 PM, Michael Bridgen wrote:

    My questions are:
    1. In the function definition, what does the argument "ticket" mean, and
    how to use it?
    It's a throwback to AMQP 0-8 that was removed in AMQP 0-9-1 (I don't know
    why it's in an API). Just let it default to 0.


    2. What is the set of arguments for "arguments = {}"?
    Generally, none. It's an extension mechanism in AMQP, and usually left
    alone. Aside from vendor extensions, the only reason for ever using it is
    for a binding to a headers exchange, which encodes its match values in the
    'arguments' field.

    -Michael




    ______________________________**_________________
    rabbitmq-discuss mailing list
    rabbitmq-discuss at lists.**rabbitmq.com<rabbitmq-discuss at lists.rabbitmq.com>
    https://lists.rabbitmq.com/**cgi-bin/mailman/listinfo/**rabbitmq-discuss<https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss>
    ______________________________**_________________
    rabbitmq-discuss mailing list
    rabbitmq-discuss at lists.**rabbitmq.com<rabbitmq-discuss at lists.rabbitmq.com>
    https://lists.rabbitmq.com/**cgi-bin/mailman/listinfo/**rabbitmq-discuss<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/20120112/6ff8928e/attachment.htm>

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedJan 11, '12 at 1:31a
activeJan 12, '12 at 1:25a
posts5
users3
websiterabbitmq.com
irc#rabbitmq

People

Translate

site design / logo © 2022 Grokbase