1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00

Fix Typos

This PR fixes a number of typos and grammatical errors found within
the NATS documentation. Note that it is not comprehensive and there
are likely other errors to be found.
This commit is contained in:
Nick Calibey
2019-07-26 16:36:30 -05:00
parent 6ec19ef95f
commit 1fd055097b
15 changed files with 31 additions and 32 deletions

View File

@@ -6,7 +6,7 @@ NATS Streaming is a service on top of NATS. To connect to the service you first
Connecting to a streaming server requires a cluster id, defined by the server configuration, and a client ID defined by the client.
_Client ID should contain only alphanumeric characters, `-` or `_`_
*Client ID should contain only alphanumeric characters, `-` or `_`*
Connecting to a server running locally on the default port is as simple as this:
@@ -23,4 +23,4 @@ Sometimes you may want to provide NATS settings that aren't available in the str
```go
sc, err := stan.Connect(clusterID, clientID, stan.NatsConn(nc))
```
```

View File

@@ -54,7 +54,7 @@ A connection request is sent when a streaming client connects to the NATS Stream
More advanced libraries can set the protocol to 1 and send a connection ID which in combination with ping interval and ping max out allows the library to detect that the connection to the server is lost.
This request is published to a subject comprised of the `<discover-prefix>.cluster-id`, for example, if a NATS Streaming Server was started with a cluster-id of `mycluster`, and the default prefix was used, the client publishes to `_STAN.discover.mycluster`
This request is published to a subject comprised of the `<discover-prefix>.cluster-id`. For example, if a NATS Streaming Server was started with a cluster-id of `mycluster`, and the default prefix was used, the client publishes to `_STAN.discover.mycluster`
##### Message Structure
@@ -262,4 +262,4 @@ The `CloseResponse` is sent by the NATS Streaming Server on the reply subject of
- `error`: error string, empty/omitted if no error
[Back to table](#protocols)
[Back to table](#protocols)

View File

@@ -11,7 +11,7 @@ Subscriptions come in several forms:
For more details on the various types, check the [concepts](/nats_streaming/channels/subscriptions/subscriptions.md) section.
***Note: message callbacks are invoked serially, one message at a time. If your application does not care about processing ordering and would prefer the messages to be dispatched concurrently, it is the application responsibility to move them to some internal queue to be picked up by threads/go routines.***
***Note: message callbacks are invoked serially, one message at a time. If your application does not care about processing ordering and would prefer the messages to be dispatched concurrently, it is the application's responsibility to move them to some internal queue to be picked up by threads/go routines.***
Subscriptions set their starting position on creation using position or time. For example, in Go you can start at:
@@ -49,7 +49,7 @@ sub, err := sc.Subscribe("foo",
stan.StartAtTime(startTime))
```
To set the delay after which the server should attempt to redeliver a message for which it has not receive an acknowledgment:
To set the delay after which the server should attempt to redeliver a message for which it has not received an acknowledgment:
```go
sub, err := sc.Subscribe("foo",
@@ -57,7 +57,7 @@ sub, err := sc.Subscribe("foo",
stan.AckWait(20*time.Second))
```
When an application wishes to stop receiving, but want to maintain the connection opened, the subscription should be closed. There are two ways to stop a subscription, either "close" it, or "unsubscribe" it. For non durable subscriptions, this is equivalent since the subscription will be completely removed. For durable subscriptions, close means that the server will stop delivering, but remember the durable subscription. Unsubscribe, however, means that the server will remove the state of this subscription.
When an application wishes to stop receiving, but wants to maintain the connection opened, the subscription should be closed. There are two ways to stop a subscription, either "close" it, or "unsubscribe" it. For non durable subscriptions, this is equivalent since the subscription will be completely removed. For durable subscriptions, close means that the server will stop delivering, but remember the durable subscription. Unsubscribe, however, means that the server will remove the state of this subscription.
To simply close:
```go