Comment 7 for bug 686048

Revision history for this message
Marek Kowalski (kowalski0123) wrote :

Ok, maybe I went to far. To explain more I shall cite a paragraph from the amqp spec you have attached earlier (section 2.2.1):

'''
To make method processing simple, we define distinct replies for each synchronous request. That is, no
method is used as the reply for two different requests. This means that a peer, sending a synchronous
request, can accept and process incoming methods until getting one of the valid synchronous replies. This
differentiates AMQP from more traditional RPC protocols.
'''

The problem in txAMQP, which I think needs fixing, is that it assumes that the first incoming message is the response for the synchronous call. This is not a case according to specification nor to the actual behavior of the RabbitMQ server. So I propose fixing it with using more advanced implementation of the DeferredQueue, which would allow specifying (during calling get) the list of method id's which should fire the Deferred. What do you think ?

Just forget the last paragraph (with receiving messages) after digging into spec I see it is different form of communication so it isn't a case.

Cheers!
MK