[rabbitmq-discuss] Exchange to exchange bindings in python (pika)
Gavin M. Roy
gmr at meetme.com
Thu Sep 20 12:29:51 BST 2012
And I see a bug from my test code and what I pasted... The
channel.transport.rpc line should be:
channel.transport.rpc(Exchange.Bind(source='topicEx',
destination='anotherEx', routing_key='#'), exchange_bound,
[Exchange.BindOk])
On Thu, Sep 20, 2012 at 6:28 AM, Gavin M. Roy <gmr at meetme.com> wrote:
> The method exchange_bind is not defined on the channel, I will add to the
> 0.9.6 tree. Exchange.Bind can be accessed with the following code (tested
> with pypi installed 0.9.5):
>
> import pika
> from pika.spec import Exchange
>
> connection =
> pika.BlockingConnection(pika.ConnectionParameters(host='127.0.0.1'))
> channel = connection.channel()
>
> def exchange_bound(frame):
> print 'Exchange Bound'
>
> channel.transport.rpc(spec.Exchange.Bind(source='topicEx',
> destination='anotherEx', routing_key='#'), exchange_bound,
> [Exchange.BindOk])
>
> On Wed, Sep 5, 2012 at 5:56 AM, Matthias Radestock <matthias at rabbitmq.com>wrote:
>
>> Dave,
>>
>> apologies for the late response...
>>
>>
>> On 23/08/12 04:24, Dave Curylo wrote:
>>
>>> I get this error attempting to call channel.exchange_bind:
>>>
>>> 'BlockingChannel' object has no attribute 'exchange_bind'
>>>
>>> This is my source:
>>>
>>> import pika
>>> connection =
>>> pika.BlockingConnection(pika.**ConnectionParameters(host='10.**
>>> 0.1.100'))
>>> channel = connection.channel()
>>> channel.exchange_bind(source='**topicEx', destination='anotherEx',
>>> routing_key='#')
>>>
>>> I'm running pika version 0.9.5.
>>> >>> pika.__version__
>>> '0.9.5'
>>>
>>> What am I missing that keeps me from being able to do exchange to
>>> exchange bindings?
>>>
>>
>> There's no mention of exchange_bind in the pika docs, though if Gavin
>> says that it's supported then presumably it is. And looking at the code on
>> github, that does indeed appear to be the case, though I am no python
>> expert.
>>
>> You may want to ask on the pika google group - https://groups.google.com/
>> **forum/#!forum/pika-python<https://groups.google.com/forum/#!forum/pika-python>- or file a bug on github.
>>
>> Regards,
>>
>> Matthias.
>>
>> ______________________________**_________________
>> 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>
>>
>
>
>
> --
>
> Gavin M. Roy
> Chief Technology Officer
>
> <http://www.meetme.com/>
> 100 Union Square Drive
> New Hope, PA 18938
> p. +1.215.862.1162 x263
> f. +1.215.862.0465
>
> <https://www.facebook.com/pages/MeetMe/21931227129> <https://twitter.com/meetme>
> <http://www.youtube.com/user/MeetMeVideos>
>
> The public market leader in social discovery. (NYSE MKT: MEET)
>
>
--
Gavin M. Roy
Chief Technology Officer
<http://www.meetme.com/>
100 Union Square Drive
New Hope, PA 18938
p. +1.215.862.1162 x263
f. +1.215.862.0465
<https://www.facebook.com/pages/MeetMe/21931227129>
<https://twitter.com/meetme>
<http://www.youtube.com/user/MeetMeVideos>
The public market leader in social discovery. (NYSE MKT: MEET)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120920/242efce1/attachment.htm>
More information about the rabbitmq-discuss
mailing list