Closed inzagher closed 1 year ago
Hello there, it works, I'm using it.
I use Spring at server side:
@Override
public void configureMessageBroker(MessageBrokerRegistry config) {
config.setApplicationDestinationPrefixes("/stomp");
config.enableSimpleBroker("/topic", "/queue")
.setHeartbeatValue(new long[]{20000, 20000}) // 20 seconds Ping-Pong
.setTaskScheduler(new DefaultManagedTaskScheduler());
}
Then, in Typescript they should match. Do some tests by modifing all values.
// How often to heartbeat?
// Interval in milliseconds, set to 0 to disable
heartbeatIncoming: 20000, // Typical value 0 - disabled
heartbeatOutgoing: 20000, // Typical value 20000 - every 20 seconds
Hello. I'm using spring boot server too, without scheduler and heartbeat settings. When I set these values, typescript client sends and receives heartbeat messages. Websocket connection uses server side settings, client settings are ignored. This is exactly what I'm looking for. Thanks a lot!
In my angular project i use rx-stomp client with both heartbeat parameters set. But server does not send heartbeat message. If i use stompjs, server sends heartbeat messages every 25 seconds. Is it bug, or rx-stomp client configuration settings are wrong?
"@angular/core": "^14.2.5", "@stomp/rx-stomp": "^1.2.0"