Closed cn-kali-team closed 1 month ago
It looks like retry_on_initial_connect
is already doing what you're looking for and retry_on_failed_connect
is just dead code
Oh, maybe this is the old code in syncing NATS. I can't reconnect in the consumer, but can I reconnect by switching to stream?
The reconnect happens automatically in the client.
You check the events
on connection to see what's the state of connection.
The retry_on_initial_connect
is for the client to retry connecting if initial connection failed.
Reconnecting afterwards will happen reagardless this option value.
The dead code has been removed. Closing. Sorry for the confusion.