Closed selaux closed 10 years ago
Hi, thanks a lot for the detailed bug report.
What's happened here is that the rabbitmq server was unable to deliver your message, so it's returned it to you using the "basic return" message. The exception happens because I haven't got around to implementing basic return yet. (This lib is still in 'alpha' mode!)
I need to think about the API before writing this code... I'll probably be able to get the feature done (and maybe fixing issue #2) next Tuesday or Wednesday. In the mean time I'm going to leave this issue open.
Hope that's all OK for you!
@selaux I've written a provisional API for returned messages. By default it'll throw an exception (so you'll still see "Future/Task exception was never retrieved") but you can now override this using channel.set_return_handler
. This method accepts a function which will be called when the server returns an undeliverable message.
Can you try installing the latest code on the master branch and let me know whether this adequately addresses your issue?
Thanks, Benjamin
I will test it tonight and let you know.
Yeah :+1:, I can work with that solution, but couldn't it be possible so add publish
-coroutine that waits until the response from rabbitmq is received? (or maybe I don't get the protocol :wink:)
Unfortunately that can't be done - when the message is delivered successfully there's no reply from the server. So the coroutine would be waiting forever :wink:
Im getting an error when publishing a message with the following code and i can't get behind the issue:
The trace of the error:
RabbitMQ Version: 3.3.5
I don't know what other information you need to trace this.