mynatsclient
mynatsclient copied to clipboard
Feature: Configure automatic reconnection
As a consumer of MyNatsClient in a collection of microservices, I would like more detailed control over the automatic reconnection behavior.
The following options should be configurable at the client level:
- Maximum reconnection attempts
- Including: reconnect forever
- Reconnection delay between attempts
Additionally, an event should be raised when the client is reconnecting.
MyNatsClient has been created with the idea of being simple. As in not becoming to complex in the sense of starting to queue messages etc if not connected etc. But instead be able to let the user handle this in their code by wrapping and handling the events of the client.
This although is probably a good suggestion that should be in. In the meantime, you should be able to handle this by turning of auto reconnect and react to the event your self.