mirror of
https://github.com/taigrr/nats.docs
synced 2025-01-18 04:03:23 -08:00
Incorporating comments from PR
Signed-off-by: Matthias Hanel <mh@synadia.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
# Listening for Reconnect Events
|
||||
|
||||
Because reconnect is primarily under the covers many libraries provide an event listener you can use to be notified of reconnect events. This event can be especially important for applications sending a lot of messages.
|
||||
- [ ] what do clients commonly do if reconnect is in progress and say a message is published? Block or error?
|
||||
|
||||
{% tabs %}
|
||||
{% tab title="Go" %}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# Pausing Between Reconnect Attempts
|
||||
|
||||
It doesn’t make much sense to try to connect to the same server over and over. To prevent this sort of thrashing, and wasted reconnect attempts, libraries provide a wait setting. Generally clients make sure that between two reconnect attempts to the **same** server at least a certain amount of time has passed. The concrete implementation depends on the library used.
|
||||
It doesn’t make much sense to try to connect to the same server over and over. To prevent this sort of thrashing, and wasted reconnect attempts, especially when using TLS, libraries provide a wait setting. Generally clients make sure that between two reconnect attempts to the **same** server at least a certain amount of time has passed. The concrete implementation depends on the library used.
|
||||
|
||||
This setting not only prevents wasting client resources, it also alleviates a [_thundering herd_](random.md) situation when additional servers are not available.
|
||||
|
||||
{% tabs %}
|
||||
{% tab title="Go" %}
|
||||
|
||||
Reference in New Issue
Block a user