[rabbitmq-discuss] About exchange bindings

Brian Jing brian.newsgroup at gmail.com
Wed Jan 11 02:14:32 GMT 2012


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 <jerryk at vmware.com> 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>


More information about the rabbitmq-discuss mailing list