[rabbitmq-discuss] Question on ordering of basic.return and CommitOK.
mpietrek at skytap.com
Tue Sep 4 17:52:28 BST 2012
I've recently added support in my (Pika-based) code for returned message
support. It's generally working as expected, but there's one question about
the ordering of data from the broker.
The scenario: I'm publishing a message to a non-existent queue. My channel
is in transaction mode, so I'm calling channel.tx_commit() after
channel.basic_publish. I've registered a callback handler for return
messages ( channel.add_on_return_callback() )
What I'm seeing is that the basic.return message comes back from the broker
and enters my callback *before* the channel.tx_commit() returns.
Conceptually I'm fine with this. My understanding is that the basic_return
from the broker is expected to be asynchronous.
However, my question is: Is this ordering guaranteed? Can/will the broker
always send the basic.return before sending the commitOK message? Or could
a client see a CommitOK indicating the broker has the message, and then 10
seconds later see the basic.return?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss