Closed jhyot closed 1 year ago
Please check a possible solution for the stompjs at https://github.com/stomp-js/stompjs/issues/249. The same logic is usable with this wrapper.
In RxStomp a few callbacks are available as RxJS observavbles:
onConnect
as https://stomp-js.github.io/api-docs/latest/classes/RxStomp.html#connected$onWebSocketClose
as
// In Typescript
const disConnected$ = this.connectionState$.pipe(
filter((currentState: RxStompState) => {
return currentState === RxStompState.CLOSED;
});
)
Is there a way to have a backoff (e.g. exponential) for the reconnect delay in
RxStompService
?I want to have the reconnect delay initially as a small value, but if the server is not available or has other problems, the reconnect should not continue trying to reconnect infinitely with the short delay; instead the delay should get progressively longer.