stomp-js / rx-stomp

STOMP adaptor for RxJS
Apache License 2.0
111 stars 21 forks source link

Reconnect delay backoff #467

Closed jhyot closed 1 year ago

jhyot commented 1 year ago

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.

kum-deepak commented 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: