rust-amqp icon indicating copy to clipboard operation
rust-amqp copied to clipboard

Off by one when handling basic.return frames?

Open Keruspe opened this issue 8 years ago • 2 comments

If I try to publish a message to a queue that no longer exists with the mandatory field set to true, the publish "succeeds", but then if I try to start a consumer, I get a "basic.return" instead of a "basic.consume-ok" thus the creation of the consumer fails.

If mandatory is set to false everything works properly. If I ignore the error the consumer works properly.

Keruspe avatar Nov 05 '16 18:11 Keruspe

Is this happening in the same program and the same channel? Unfortunately asynchronous methods like basic.publish, basic.return are not handled properly yet. There should be a generic handler for such methods, which will handle them in the right way. I implemented a better way of handling them in the tokio branch, but it's not ready yet.

Antti avatar Dec 13 '16 12:12 Antti

Same channel, yup. I can provide a simple reproducer if needed

Keruspe avatar Dec 13 '16 12:12 Keruspe