stompjs
stompjs copied to clipboard
Max reconnect attempts and exponential back-off
I was looking for an example where I could either set a max number of reconnect attempts, and couldn't find any. I saw an issue on the ng2-stompjs project, but is there one specific to this project?
I will add a FAQ entry for this soon. Give me few days.
Thanks, any update on this?
I have created a branch of samples implementing this. It also implements exponential back-off, i.e., each subsequent connection attempt will after 200, 400, 800, 1600 ... ms.
See the diff at https://github.com/stomp-js/samples/pull/4/files and full source at https://github.com/stomp-js/samples/blob/max-reconnects/stompjs/chat/chat.html
Awesome, thanks for the samples!
Keeping it open for a while till I create a FAQ entry.
Is this still open? :(
I need some option like maxAttempt: 10
Is there a solution or workaround for configuring max reconnect attempts?