I'd like to make sure that my message was delivered to a queue.
To do so I'm adding the mandatory param to the basic_publish.
What else should I do to receive the basic.return
message if my message wasn't successfully delivered?
I can't use channel.wait()
to listen for the basic.return
because when my message is successfully delivered the wait()
function hangs forever. (There is no timeout)
On the other hand. When I don't call channel.wait()
the channel.returned_messages
will remain empty, even if the message isn't delivered.
I use py-amqplib
version 0.6.
Any solution is welcome.
It is currently impossible as the
basic.return
is sent asynchronously when a message is dropped in broker. When message was sent successfully no data is reported from server. So pyAMQP can't listen for such messages.I've read few threads about this problem. Possible solution were:
basic.return
messages when they arrive.Because the level of support for pyAMQP and rabbitMQ in general is quite low, we decided not to use amqp broker at all.