title: How does rabbitmq heartbeat work
body: <p>The native rabbitmq client for java allows to setup heartbeat on connection settings, for example like this:</p>
  
  <pre><code>import com.rabbitmq.client.ConnectionFactory;
  
  ...
  
  ConnectionFactory connectionFactory = new ConnectionFactory();
          connectionFactory.setAutomaticRecoveryEnabled(true);
          connectionFactory.setHost("some://host");
          connectionFactory.setConnectionTimeout(5000);
          connectionFactory.setRequestedHeartbeat(5); // keeps an idle connection alive
  </code></pre>
  
  <p>What is the rabbitmq client doing with the heartbeat settings?
  Is it sending a stubbed message to special exchange/queue or what does it else?</p>
  
  <p>Can somebody explain it in details?</p>