rust-amqp
rust-amqp copied to clipboard
Off by one when handling basic.return frames?
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.
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.
Same channel, yup. I can provide a simple reproducer if needed