Errors are only raised on channel close
Bug #956132 reported by
Aurélien Bompard
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
txAMQP |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When I try to publish to a non-existant exchange, the error is silentely ignored until I close the channel.
Here's a sample code to demonstrate the bug : http://
When run, you'll see it send a message to a non-existent exchange, wait 3 seconds, and close the channel. The traceback will only appear when the channel is closed.
I think the proper behavior would be to raise the exception on the basic_publish call itself.
Changed in txamqp: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
OK, after investigating, it looks like I get the exception on channel_close() because the channel was already closed, due to the send error. The exception is raised with the last error message.
This is rather surprising from a user point of view : my basic_publish() actually fails but the deferred's callback is called, and the channel is silently closed. I think it would be more logical to get and errback on the basic_publish deferred.
Or am I doing something wrong here ?