title: Spring STOMP over WebSockets not scheduling heartbeats
body: <p>We have a Spring over WebSockets connection that we're passing a <code>CONNECT</code> frame:</p>
  
  <pre><code>CONNECT\naccept-version:1.2\nheart-beat:10000,10000\n\n\u0000
  </code></pre>
  
  <p>Which the handler acknowledges, starts a new session, and than returns:</p>
  
  <pre><code>CONNECTED
  version:1.2
  heart-beat:0,0
  </code></pre>
  
  <p>However, we want the heart-beats so we can keep the WebSocket open. We're <em>not</em> using SockJS.</p>
  
  <p>I stepped through the Spring Message Handler:</p>
  
  <pre><code>StompHeaderAccessor [headers={simpMessageType=CONNECT, stompCommand=CONNECT, nativeHeaders={accept-version=[1.2], heart-beat=[5000,0]}, simpSessionAttributes={}, simpHeartbeat=[J@5eba717, simpSessionId=46e855c9}]
  </code></pre>
  
  <p>After it gets the <code>heart-beat</code> (native header), it sets what looks like a memory address <code>simpHeartbeat=[J@5eba717, simpSessionId=46e855c9}]</code></p>
  
  <p>Of note, after the broker authenticates: </p>
  
  <p><code>Processing CONNECT session=46e855c9</code> (the sessionId here is different than simpSessionId)?</p>
  
  <p>When running earlier <code>TRACE</code> debugging I saw a notice "Scheduling heartbeat..." or something to that effect...though I'm not seeing it now?</p>
  
  <p>Any idea what's going on?</p>
  
  <p>Thanks</p>
  
  <p>I have found the explanation in the <a href="http://docs.spring.io/spring-framework/docs/4.1.0.RC1/spring-framework-reference/html/websocket.html#websocket-stomp-stats" rel="noreferrer">documentation</a>: </p>
  
  <blockquote>
    <p>SockJS Task Scheduler stats from thread pool of the SockJS task
    scheduler which is used to send heartbeats. <strong>Note that when heartbeats
    are negotiated on the STOMP level the SockJS heartbeats are disabled.</strong></p>
  </blockquote>
  
  <p>Are SockJS heartbeats different than STOMP heart-beats?</p>