mirror of
https://github.com/taigrr/nats.docs
synced 2025-01-18 04:03:23 -08:00
minor clean up to some content
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Turning Off Echo'd Messages
|
||||
|
||||
By default a NATS connection will echo messages if the connection also has interest in the published subject. This means that if a publisher on a connection sends a message to a subject any subscribers on that same connection will receive the message. Clients can opt to turn off this behavior, such that regardless of interest the message will not be delivered to subscribers on the same connection.
|
||||
By default a NATS connection will echo messages if the connection also has interest in the published subject. This means that if a publisher on a connection sends a message to a subject any subscribers on that same connection will receive the message. Clients can opt to turn off this behavior, such that regardless of interest, the message will not be delivered to subscribers on the same connection.
|
||||
|
||||
The NoEcho option can be useful in BUS patterns where all applications subscribe and publish to the same subject. Usually a publish represents a state change that the application already knows about, so in the case where the application publishes an update it does not need to process the update itself.
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@ The client and server use a simple PING/PONG protocol to check that either of th
|
||||
|
||||

|
||||
|
||||
Once a configurable maximum of outstanding pings without a single pong reply is hit, the connection is closed as stale. Together these two values define a timeout for the connection which specifies how quickly the client will be notified of a problem. This will also help when there is a remote network partition where the operating system does not detect a socket error. Upon connection close the client will attempt to reconnect. When it knows about other servers, these will be tried next.
|
||||
Once a configurable maximum of outstanding pings without a single pong reply is hit, the connection is closed as stale. Together these two values define a timeout for the connection which specifies how quickly the client will be notified of a problem. This will also help when there is a remote network partition where the operating system does not detect a socket error. Upon connection close, the client will attempt to reconnect. When it knows about other servers, these will be tried next.
|
||||
|
||||
In the presence of traffic, such as messages or client side pings, the server will not initiate the PING/PONG interaction.
|
||||
|
||||
On connections with a lot of traffic, the client will often figure out there is a problem between PINGS, and as a result the default PING interval is often on the order of minutes. To set the interval to 20s and limit outstanding pings to 5, thus force a closed connection after 100s of inactivity:
|
||||
On connections with a lot of traffic, the client will often figure out there is a problem between PINGS, and as a result the default PING interval is often on the order of minutes. To set the interval to 20s and limit outstanding pings to 5, thus forcing a closed connection after 100s of inactivity:
|
||||
|
||||
{% tabs %}
|
||||
{% tab title="Go" %}
|
||||
|
||||
Reference in New Issue
Block a user