I'm trying to make sure that I handle reconnection correctly in the
event that RabbitMQ forces connection closure or a broken pipe
condition occurs. I'm using RabbitMQ 1.7.0 with Erlang 12-B and the
bunny Ruby client v0.6.0 for testing. If I shutdown the server while
my client is connected or invoke an AMQP method with incorrect
arguments I can create the condition whereby RabbitMQ will forcefully
close the connection. What I'm seeing is this type of error in the
log when I try to reconnect with the same client instance -
exception on TCP connection <0.1567.0> from 127.0.0.1:57174
I can connect with another instance without difficulty. Firstly, can
anyone explain why this error is occurring in the circumstances that
I have outlined and secondly, is there a way that I can reconnect
using the same client instance.
I'm sure that I read something that stated that this is the correct
behaviour for an AMQP server, but unfortunately I can't recall where
I read it.