-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Channel#wait_for_confirms may hang until it timeouts in case of some channel-level errors #425
Comments
Please post questions to the mailing list in the future. |
Bunny::Channel#wait_for_confirms has a timeout. It will try to release outstanding continuations on errors but your code has a race condition it cannot do much about: In case |
I had missed the mailing list, will use it in the future for questions.
Is it feasible to think about releasing outstanding continuations on errors and channel close frames? Looking though the code of |
Then please file a specific issue about throwing exceptions on an already closed channel. Server-sent |
I accidentally encountered a case where I did a publish to a channel and then called
wait_for_confirms
which hung and did timeout because a channel-level error had occurred.Here is a short example demonstrating the issue:
While the example looks like a problem in the application logic, I think there might also be other cases where the channel might be closed by RabbitMQ and that there should be a way to handle such errors using Bunny's public API. I'm looking for such a way, but I haven't found one yet.
If this is expected behavior in Bunny, what's the proper way to do a publish and then wait (blocking the calling thread) until either an error occurred (including the channel being closed by RabbitMQ) or
wait_for_confirms
returned?The text was updated successfully, but these errors were encountered: