title: Increase heartbeat value in spring rabbit
body: <p>I'm facing some <a href="https://stackoverflow.com/questions/38771664/rabbitmq-java-client-stops-consuming-messages/38772359#38772359">problems</a> with my setup and I'm trying to increase the heartbeat interval in order to test a possible fix. 
  I'm using </p>
  
  <pre><code>Spring boot 1.3.2.RELEASE
  Spring rabbit 1.5.3.RELEASE
  </code></pre>
  
  <p>And the code instantiating the connection factory is the below</p>
  
  <pre><code>RabbitConnectionFactoryBean connectionFactoryBean = new RabbitConnectionFactoryBean();
  connectionFactoryBean.setUseSSL(useSsl);
  connectionFactoryBean.setHost(rabbitHostname);
  connectionFactoryBean.setVirtualHost(rabbitVhost);
  connectionFactoryBean.setUsername(rabbitUsername);
  connectionFactoryBean.setPassword(rabbitPassword);
  connectionFactoryBean.setConnectionTimeout(900000);
  connectionFactoryBean.setRequestedHeartbeat(900);
  connectionFactoryBean.afterPropertiesSet();
  
  CachingConnectionFactory cf = new CachingConnectionFactory(connectionFactoryBean.getObject());
  cf.setChannelCacheSize(40);
  return cf;
  </code></pre>
  
  <p>The problem is that the heartbeat interval is not changing. I quick look in AMQConnection reveals the below</p>
  
  <pre><code>int heartbeat = negotiatedMaxValue(this.requestedHeartbeat,
                                     connTune.getHeartbeat());
  
  
  private static int negotiatedMaxValue(int clientValue, int serverValue) {
          return (clientValue == 0 || serverValue == 0) ?
              Math.max(clientValue, serverValue) :
              Math.min(clientValue, serverValue);
  }
  </code></pre>
  
  <p>The value coming from the server is 60. The method <code>negotiatedMaxValue</code> will not respect the client's preferences (cannot disable heartbeat nor increase it). Am I missing something? </p>