spring-framework / org.springframework.messaging.simp.stomp / StompClientSupport / setDefaultHeartbeat

setDefaultHeartbeat

open fun setDefaultHeartbeat(heartbeat: LongArray): Unit

Configure the default value for the "heart-beat" header of the STOMP CONNECT frame. The first number represents how often the client will write or send a heart-beat. The second is how often the server should write. A value of 0 means no heart-beats.

By default this is set to "10000,10000" but subclasses may override that default and for example set it to "0,0" if they require a TaskScheduler to be configured first.

Parameters

heartbeat - the value for the CONNECT "heart-beat" header

See Also
<a href="http://stomp.github.io/stomp-specification-1.2.html#Heart-beating">