title: How can a RabbitMQ Client tell when it loses connection to the server?
body: <p>If I'm connected to RabbitMQ and listening for events using an EventingBasicConsumer, how can I tell if I've been disconnected from the server? </p>
  
  <p>I know there is a Shutdown event, but it doesn't fire if I unplug my network cable to simulate a failure. </p>
  
  <p>I've also tried the ModelShutdown event, and CallbackException on the model but none seem to work.</p>
  
  <p>EDIT-----
  The one I marked as the answer is correct, but it was only part of the solution for me. There is also HeartBeat functionality built into RabbitMQ. The server specifies it in the configuration file. It defaults to 10 minutes but of course you can change that. </p>
  
  <p>The client can also request a different interval for the heartbeat by setting the RequestedHeartbeat value on the ConnectionFactory instance.</p>