Hi, I have a Rails application that publishes messages to Rabbit. I
E, [2013-07-16T13:06:24.210953 #6897] ERROR -- #<Bunny::Session:70100018889260 user@host:5672, vhost=my_host>: Exception in the reader loop: Bunny::InternalError: Connection-level error: INTERNAL_ERROR
E, [2013-07-16T13:06:24.211192 #6897] ERROR -- #<Bunny::Session:70100018889260 user@host:5672, vhost=my_host>: Backtrace:
E, [2013-07-16T13:06:24.211278 #6897] ERROR -- #<Bunny::Session:70100018889260 user@host:5672, vhost=my_host>: /Users/desmond/.rvm/gems/ruby-2.0.0-p0@threering/gems/bunny-0.9.0/lib/bunny/session.rb:391:in `handle_frame'
E, [2013-07-16T13:06:24.211365 #6897] ERROR -- #<Bunny::Session:70100018889260 user@host:5672, vhost=my_host>: /Users/desmond/.rvm/gems/ruby-2.0.0-p0@threering/gems/bunny-0.9.0/lib/bunny/reader_loop.rb:75:in `run_once'
E, [2013-07-16T13:06:24.211441 #6897] ERROR -- #<Bunny::Session:70100018889260 user@host:5672, vhost=my_host>: /Users/desmond/.rvm/gems/ruby-2.0.0-p0@threering/gems/bunny-0.9.0/lib/bunny/reader_loop.rb:34:in `block in run_loop'
E, [2013-07-16T13:06:24.211519 #6897] ERROR -- #<Bunny::Session:70100018889260 user@host:5672, vhost=my_host>: /Users/desmond/.rvm/gems/ruby-2.0.0-p0@threering/gems/bunny-0.9.0/lib/bunny/reader_loop.rb:31:in `loop'
E, [2013-07-16T13:06:24.211596 #6897] ERROR -- #<Bunny::Session:70100018889260 user@host:5672, vhost=my_host>: /Users/desmond/.rvm/gems/ruby-2.0.0-p0@threering/gems/bunny-0.9.0/lib/bunny/reader_loop.rb:31:in `run_loop'
/Users/desmond/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/irb/input-method.rb:152:in `readline': caught an unexpected exception in the network loop: Connection-level error: INTERNAL_ERROR (Bunny::NetworkFailure)
My current strategy is to connect to Rabbit when the app starts and check for a proper connection each time I publish a message, logging any errors and gracefully moving on. I haven't found any documentation for managing connectivity issues once the app's connected. Is there a better way to tolerate the broker (or its server) going down?