-
Notifications
You must be signed in to change notification settings - Fork 303
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
Closed transports cause silent failures on writes #560
Comments
Socket writes trigger connection recovery. Doing that and throwing an exception make little sense. More importantly, if you want reliable delivery, I/O exceptions is not what you are looking for: they might come way too late. Publisher confirms is what you are looking for. |
If the session doing a connection recovery, then it's status will be ":disconnected". When it is disconnected, calls to session#send_frame and session#send_frame_without_timeout will both raise ConnectionClosedError, which is good because then the client will know it failed. However, session#send_frameset and session#send_frameset_without_timeout don't perform the session#open? check. That means everything except basic_publish raises ConnectionClosedError. Why would basic_publish be different than all other writes operations? |
da6f972 provides an explanation. |
|
Reproduced with Bunny 2.11.0 and RabbitMQ 3.7.6
If there is a closed transport, transport#write will silently fail when attempting to publish. This is when using automatically_recover: true and threaded: false.
Code to reproduce this issue can be found here: https://github.com/sbonebrake/bunny_repro/blob/master/heartbeat_failure_causes_silent_write_fails.rb
The text was updated successfully, but these errors were encountered: