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

updated gnatsd to nats-server

This commit is contained in:
ainsley 2019-05-22 13:15:35 -05:00
parent 5da9b66f5e
commit cb1d5126a1
9 changed files with 24 additions and 24 deletions

View File

@ -6,7 +6,7 @@ Fundamentally NATS is about publishing and listening for messages. Both of these
digraph g {
rankdir=LR
publisher [shape=box, style="rounded", label="PUB time.us"];
subject [shape=circle, label="gnatsd"];
subject [shape=circle, fixedsize="true", width="1.0", height="1.0", label="nats-server"];
sub1 [shape=box, style="rounded", label="SUB time.us"];
sub2 [shape=box, style="rounded", label="SUB time.us"];
@ -27,7 +27,7 @@ time.us
time.us.east
time.us.east.atlanta
time.eu.east
time.us.east.warsaw
time.eu.warsaw
```
to logically group related subjects.
@ -44,7 +44,7 @@ The first wildcard is `*` which will match a single token. For example, if an ap
digraph g {
rankdir=LR
publisher [shape=box, style="rounded", label="PUB time.us.east"];
subject [shape=circle, label="gnatsd"];
subject [shape=circle, fixedsize="true", width="1.0", height="1.0", label="nats-server"];
sub1 [shape=box, style="rounded", label="SUB time.*.east"];
sub2 [shape=box, style="rounded", label="SUB time.us.east"];
@ -62,7 +62,7 @@ The second wildcard is `>` which will match one or more tokens, and can only app
digraph g {
rankdir=LR
publisher [shape=box, style="rounded", label="PUB time.us.east.atlanta"];
subject [shape=circle, label="gnatsd"];
subject [shape=circle, fixedsize="true", width="1.0", height="1.0", label="nats-server"];
sub1 [shape=box, style="rounded", label="SUB time.us.east.atlanta"];
sub2 [shape=box, style="rounded", label="SUB time.us.*"];
sub3 [shape=box, style="rounded", label="SUB time.us.>"];

View File

@ -1,5 +1,5 @@
# Connecting to the Default Server
Some libraries also provide a special way to connect to a *default* url, which is general `nats://localhost:4222`:
Some libraries also provide a special way to connect to a *default* url, which is generally `nats://localhost:4222`:
!INCLUDE "../../_examples/connect_default.html"

View File

@ -1,6 +1,6 @@
# Turning Off Echo'd Messages
By default the server will echo messages. This means that if a publisher on a connection sends a message to a subject any subscribers on that same connection may receive the message. Turning off echo is a fairly new feature for the NATS server, but some of the clients already support it.
By default the server will echo messages. 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. Turning off echo is a fairly new feature for the NATS server, but some of the clients already support it.
<div class="graphviz"><code data-viz="dot">
digraph {

View File

@ -6,7 +6,7 @@ The client and server use a simple PING/PONG protocol to check that they are bot
digraph g {
rankdir=LR
client [shape=box, style="rounded", label="NATS Client"];
gnatsd [shape=circle, label="gnatsd"];
gnatsd [shape=circle, fixedsize="true", width="1.0", height="1.0", label="nats-server"];
client -> gnatsd [label="PING"];
gnatsd -> client [label="PONG"];

View File

@ -8,7 +8,7 @@ Keep in mind that the queue groups in NATS are dynamic and do not require any se
digraph g {
rankdir=LR
publisher [shape=box, style="rounded", label="PUB updates"];
subject [shape=circle, label="gnatsd"];
subject [shape=circle, label="nats-server"];
sub1 [shape=box, style="rounded", label="SUB updates workers"];
sub2 [shape=box, style="rounded", label="SUB updates workers"];
sub3 [shape=box, style="rounded", label="SUB updates workers"];

View File

@ -1,13 +1,13 @@
# Encrypting Connections with TLS
While authentication limits which clients can connect, TLS can be used to check the servers identity and the clients identity and will encrypt the traffic between the two. The most secure version of TLS with NATS is to use verified client certificates. In this mode, the client can check that it trusts the certificate sent by `gnatsd` but the server will also check that it trusts the certificate sent by the client. From an applications perspective connecting to a server that does not verify client certificates may appear identical. Under the covers, disabling TLS verification removes the server side check on the clients certificate. When started in TLS mode, `gnatsd` will require all clients to connect with TLS. Moreover, if configured to connect with TLS, client libraries will fail to connect to a server without TLS.
While authentication limits which clients can connect, TLS can be used to check the servers identity and the clients identity and will encrypt the traffic between the two. The most secure version of TLS with NATS is to use verified client certificates. In this mode, the client can check that it trusts the certificate sent by `nats-server` but the server will also check that it trusts the certificate sent by the client. From an applications perspective connecting to a server that does not verify client certificates may appear identical. Under the covers, disabling TLS verification removes the server side check on the clients certificate. When started in TLS mode, `nats-server` will require all clients to connect with TLS. Moreover, if configured to connect with TLS, client libraries will fail to connect to a server without TLS.
The [Java examples repository](https://github.com/nats-io/java-nats-examples/tree/master/src/main/resources) contains certificates for starting the server in TLS mode.
```sh
> gnatsd -c /src/main/resources/tls.conf
> nats-server -c /src/main/resources/tls.conf
or
> gnatsd -c /src/main/resources/tls_verify.conf
> nats-server -c /src/main/resources/tls_verify.conf
```
## Connecting with TLS

View File

@ -3,10 +3,10 @@
For this example, start the server using:
```sh
> gnatsd --user myname --pass password
> nats-server --user myname --pass password
```
You can encrypt passwords to pass to `gnatsd` using a simple tool provided by the server:
You can encrypt passwords to pass to `nats-server` using a simple tool provided by the server:
```sh
> go run mkpasswd.go -p
@ -20,7 +20,7 @@ The code uses localhost:4222 so that you can start the server on your machine to
## Connecting with a User/Password
When logging in with a password `gnatsd` will take either a plain text password or an encrypted password.
When logging in with a password `nats-server` will take either a plain text password or an encrypted password.
!INCLUDE "../../_examples/connect_userpass.html"

View File

@ -15,7 +15,7 @@ digraph nats_pub_sub {
pub1 sub1 non_active
}
gnatsd [shape="box", label="NATS", width=8];
nats-server [shape="box", label="NATS", width=8];
sub2 [shape="box", label="SUB\ncom.msg.one"];
sub3 [shape="box", label="SUB\ncom.msg.two"];
@ -26,13 +26,13 @@ digraph nats_pub_sub {
sub2 sub3 sub4
}
pub1 -> gnatsd [penwidth=2];
gnatsd -> sub1 [penwidth=2];
gnatsd -> non_active [style=dashed color=red arrowhead="none"];
pub1 -> nats-server [penwidth=2];
nats-server -> sub1 [penwidth=2];
nats-server -> non_active [style=dashed color=red arrowhead="none"];
gnatsd -> sub2 [penwidth=2];
gnatsd -> sub3 [style=dashed color=red arrowhead="none"];
gnatsd -> sub4 [penwidth=2];
nats-server -> sub2 [penwidth=2];
nats-server -> sub3 [style=dashed color=red arrowhead="none"];
nats-server -> sub4 [penwidth=2];
}
</code></div>
@ -49,9 +49,9 @@ Go and the NATS server should be installed.
When the server starts successfully, you will see the following messages:
```sh
[1] 2015/08/12 15:18:22.301550 [INF] Starting gnatsd version 0.6.4
[1] 2015/08/12 15:18:22.301550 [INF] Starting nats-server version 0.6.4
[1] 2015/08/12 15:18:22.301762 [INF] Listening for client connections on 0.0.0.0:4222
[1] 2015/08/12 15:18:22.301769 [INF] gnatsd is ready
[1] 2015/08/12 15:18:22.301769 [INF] nats-server is ready
```
The NATS server listens for client connections on TCP Port 4222.

View File

@ -9,7 +9,7 @@ Go and the NATS server should be installed.
## 1. Start the NATS server
```sh
% gnatsd
% nats-server
```
## 2. Start two terminal sessions