qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Howard <chris.how...@facilita.co.uk>
Subject Request/response between .NET server and python client
Date Wed, 11 Aug 2010 08:54:22 GMT

I am having difficulty with sending a simple request/response between a 
server written in C# and a client written in python. I have no such 
problems when the client and server are both written in python. I am 
using qpid 0.7 (built from the trunk approx. 3 weeks ago)

Here is the code for the C# server:

                 Connection connection = new Connection("localhost:5672");
                 Session session = connection.CreateSession();
                 Receiver receiver = session.CreateReceiver("send ; 
{create: always, delete: always}");

                 while (true)
                     Message request = 
                     Sender sender = session.CreateSender(request.ReplyTo);
                     Message response = new Message("pong");
             catch (System.Exception e)

And here is the code for the python client:

import qpid.messaging

connection = qpid.messaging.Connection('amqp://localhost:5672')
session = connection.session()
receiver = session.receiver('#reply ; {create: always, delete: always}')
sender = session.sender('send ; {create: always, delete: always}')
request = qpid.messaging.Message(content = 'ping', reply_to = 
response = receiver.fetch(10)
print response.content

I start the server, and then start the client. The server receives the 
request from the client, but the call to CreateSender throws an 
exception with the message:

"Exchange 9224f93b-8c4b-4675-bc04-61e721387140#reply does not exist"

Furthermore, there is another exception thrown during program exit:

Unhandled Exception: System.AccessViolationException: Attempted to read 
or write
  protected memory. This is often an indication that other memory is 
    at qpid.messaging.Message.{dtor}(Message* )
    at qpid.messaging.Message.__delDtor(Message* , UInt32 )
    at Org.Apache.Qpid.Messaging.Message.Cleanup()
    at Org.Apache.Qpid.Messaging.Message.!Message()
    at Org.Apache.Qpid.Messaging.Message.Dispose(Boolean )
    at Org.Apache.Qpid.Messaging.Message.Finalize()

Also, the output from the broker suggests that the queue /has /been created:

2010-08-11 09:44:37 info Queue 
"9224f93b-8c4b-4675-bc04-61e721387140#reply": Policy created: 
type=reject; maxCount=0; maxSize=104857600
2010-08-11 09:44:37 error Execution exception: not-found: Exchange not 
found: 9224f93b-8c4b-4675-bc04-61e721387140#reply 

Can anyone explain what I am doing wrong here? Or is this a bug?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message