Problem
If the NATS server restarts or the network blips, the application might fail to reconnect or "spam" the server with connection attempts, leading to a "crash-loop."
Proposed Solution
Configure the NATS driver with an explicit reconnection strategy, including exponential backoff and max-reconnect attempts. Ensure the application logs these events clearly so operators know when the system is in "degraded" mode.
Alternatives Considered
Implementing custom retry loops, which is redundant since the NATS Go client has built in support for this.
Additional Context
None
Problem
If the NATS server restarts or the network blips, the application might fail to reconnect or "spam" the server with connection attempts, leading to a "crash-loop."
Proposed Solution
Configure the NATS driver with an explicit reconnection strategy, including exponential backoff and max-reconnect attempts. Ensure the application logs these events clearly so operators know when the system is in "degraded" mode.
Alternatives Considered
Implementing custom retry loops, which is redundant since the NATS Go client has built in support for this.
Additional Context
None