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

Support configurable retry policy for WebSocket reconnections #585

Open
meteor199 opened this issue Aug 17, 2023 · 4 comments
Open

Support configurable retry policy for WebSocket reconnections #585

meteor199 opened this issue Aug 17, 2023 · 4 comments
Labels
help wanted Extra attention is needed
Milestone

Comments

@meteor199
Copy link

Currently stompjs does not provide configurable options for retrying WebSocket reconnections after disconnects.

It would be very helpful if stompjs could support custom retry policies through configuration options, similar to the reconnection options provided in socket.io:

https://socket.io/docs/v4/client-options/#randomizationfactor

The key options are:

  • reconnectionAttempts
  • reconnectionDelay
  • reconnectionDelayMax
  • randomizationFactor

With configurable retry, users can implement backoff retry, customize max intervals and attempts according to their needs.

@kum-deepak kum-deepak added this to the v7.1 milestone Aug 17, 2023
@kum-deepak
Copy link
Member

Will target for the v7.1

@akaNightmare
Copy link

@kum-deepak any updates?

@akaNightmare
Copy link

trying to pass some headers into subscribe methods

  • activemq.reconnectionAttempts
  • activemq.reconnectionDelay
  • etc

and have no luck, I assumed it should be handled by AMQ, but probably it's not working via WS connection

@kum-deepak kum-deepak added the help wanted Extra attention is needed label Mar 22, 2025
@kum-deepak
Copy link
Member

As part of 7.1.0, reconnectTimeMode with the options exponential and linear has been implemented. The exponential mode supports a maximum back-off period. Currently, no more work on this feature has been planned.

I will keep this ticket open with the 'help wanted' tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants