Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max reconnect attempts and exponential back-off #249

Open
crohde7707 opened this issue Jun 19, 2020 · 7 comments
Open

Max reconnect attempts and exponential back-off #249

crohde7707 opened this issue Jun 19, 2020 · 7 comments

Comments

@crohde7707
Copy link

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?

@kum-deepak
Copy link
Member

I will add a FAQ entry for this soon. Give me few days.

@crohde7707
Copy link
Author

Thanks, any update on this?

@kum-deepak
Copy link
Member

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

@crohde7707
Copy link
Author

Awesome, thanks for the samples!

@kum-deepak
Copy link
Member

Keeping it open for a while till I create a FAQ entry.

@kum-deepak kum-deepak reopened this Jun 25, 2020
@kum-deepak kum-deepak changed the title Max reconnect attempts Max reconnect attempts and exponential back-off Jun 25, 2020
@kyun
Copy link

kyun commented Jan 6, 2022

Is this still open? :(
I need some option like maxAttempt: 10

@Rupa2398
Copy link

Is there a solution or workaround for configuring max reconnect attempts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants