nats.rs icon indicating copy to clipboard operation
nats.rs copied to clipboard

Ability to make client reconnect every second indefinitely

Open chris13524 opened this issue 1 year ago • 1 comments

Use Case:

I like the reconnection capabilities of the sync nats client. You can set to keep reconnecting a max number of times (which can be None for infinity) and can also set a function to set the duration between reconnects (I would set to 1 second).

Proposed Change:

Support:

  • https://github.com/nats-io/nats.rs/blob/main/nats/src/options.rs#L83
  • https://github.com/nats-io/nats.rs/blob/main/nats/src/options.rs#L91

Who Benefits From The Change(s)?

Alternative Approaches

chris13524 avatar Jul 21 '22 17:07 chris13524

Hey!

Thanks for the issue.

We will be adding configurable retry backoff very soon. That will allow you to configure it as requested.

Jarema avatar Aug 14 '22 08:08 Jarema