qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Conway <acon...@redhat.com>
Subject Re: Sending a message to a custom QPID direct exchange from Python
Date Mon, 14 Feb 2011 22:14:46 GMT
On 02/14/2011 04:45 PM, Gregory Bayard wrote:
> Hi Gordon,
> I was originally working with 0.6 and the double-quoting was a quick
> attempt to find some problem with my exchange and queue specification.
>   When I updated my addressing string for Qpid 0.8, I still get the
> same result.  The message is picked up by topic listeners listening to
> the masterserver.summary.queue' topic on the 'masterserver.direct'
> exchange.  The string, as you specified, is now:
> "masterserver.direct/masterserver.summary.queue; {create: always,
> node: {type:topic, x-declare:{type:direct}}}"

I think you may be missing the "bind" step where your exchange is bound to your 
queue. This works for me on trunk, should work on 0.8 also:

#!/bin/env python 

from qpid.messaging import *

c = Connection("localhost")
s = c.session()
send = s.sender("foo.direct/foo.key; {create:always,node:{type:topic, 
recv = s.receiver("foo.queue;{create:always, 

print recv.fetch()

Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org

View raw message