qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Bayard <gregory.bay...@gmail.com>
Subject Sending a message to a custom QPID direct exchange from Python
Date Fri, 11 Feb 2011 16:37:06 GMT
I am using the Apache QPID 0.8 release.  I have a C++ QPID application
using the request/response model which I would like to build a Python
client for.  The C++ listens for a response on a queue called
'masterserver.summary.queue' bound to a custom direct exchange it
declared, 'masterserver.direct'.  A C++ client can send requests
without difficulty, but the requests are not received by the server
went sent from Python.

The order of operations for the C++ server is as follows:
1. Instantiate a class derrived from MessageListener
2. Create a Session and start a SubscriptionManager on it
3. Declare direct exchange 'masterserver.direct'
4. Declare a queue for the session, 'masterserver.summary.queue' as
exclusive with auto delete
5. Bind the 'masterserver.direct' exchange to the
'masterserver.summary.queue' with binding key
6. Subscribe the SubscriptionManager to the queue

The Python code I'm attempting to use to send a request follows:

import qpid.messaging
connection = qpid.messaging.endpoints.Connection("brokerhost")
session = connection.session()
requestSender =
msg = qpid.messaging.message.Message(content="test")

The server doesn't receive the request, BUT if I start a C++ server
with a topic exchange it does receive the above request (which
surprised me since I don't think the broker can handle a direct and
topic exchange with the same name).

When I attempt to specify the exchange type as direct as follows I get
an exception "error in options: node-properties: illegal key":

requestSender =
{create:always, node-properties:{type:topic, x-properties: {type:

Any ideas on how to send my request to the specified queue on the
direct exchange from Python?


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

View raw message