|
14 | 14 | # use -p or -P as needed.
|
15 | 15 |
|
16 | 16 | $ docker run -d nats-streaming
|
| 17 | +``` |
17 | 18 |
|
18 | 19 | Output that you would get if you had started with `-ti` instead of `d` (for daemon):
|
19 | 20 |
|
20 |
| -[1] 2017/01/19 20:27:37.540307 [INF] Starting nats-streaming-server[test-cluster] version 0.3.8 |
21 |
| -[1] 2017/01/19 20:27:37.540462 [INF] Starting nats-server version 0.9.6 |
22 |
| -[1] 2017/01/19 20:27:37.540493 [INF] Starting http monitor on 0.0.0.0:8222 |
23 |
| -[1] 2017/01/19 20:27:37.540550 [INF] Listening for client connections on 0.0.0.0:4222 |
24 |
| -[1] 2017/01/19 20:27:37.540574 [INF] Server is ready |
25 |
| -[1] 2017/01/19 20:27:37.825728 [INF] STAN: Message store is MEMORY |
26 |
| -[1] 2017/01/19 20:27:37.825798 [INF] STAN: --------- Store Limits --------- |
27 |
| -[1] 2017/01/19 20:27:37.825828 [INF] STAN: Channels: 100 * |
28 |
| -[1] 2017/01/19 20:27:37.825853 [INF] STAN: -------- channels limits ------- |
29 |
| -[1] 2017/01/19 20:27:37.825859 [INF] STAN: Subscriptions: 1000 * |
30 |
| -[1] 2017/01/19 20:27:37.825864 [INF] STAN: Messages : 1000000 * |
31 |
| -[1] 2017/01/19 20:27:37.825876 [INF] STAN: Bytes : 976.56 MB * |
32 |
| -[1] 2017/01/19 20:27:37.825945 [INF] STAN: Age : unlimited * |
33 |
| -[1] 2017/01/19 20:27:37.825949 [INF] STAN: -------------------------------- |
| 21 | +```bash |
| 22 | +[1] 2017/04/10 19:50:57.882306 [INF] STREAM: Starting nats-streaming-server[test-cluster] version 0.4.0 |
| 23 | +[1] 2017/04/10 19:50:57.882364 [INF] STREAM: ServerID: xCixCBvHOEkaNalxlv1Xnq |
| 24 | +[1] 2017/04/10 19:50:57.882370 [INF] STREAM: Go version: go1.7.5 |
| 25 | +[1] 2017/04/10 19:50:57.882451 [INF] Starting nats-server version 0.9.6 |
| 26 | +[1] 2017/04/10 19:50:57.882504 [INF] Starting http monitor on 0.0.0.0:8222 |
| 27 | +[1] 2017/04/10 19:50:57.882719 [INF] Listening for client connections on 0.0.0.0:4222 |
| 28 | +[1] 2017/04/10 19:50:57.882826 [INF] Server is ready |
| 29 | +[1] 2017/04/10 19:50:58.164264 [INF] STREAM: Message store is MEMORY |
| 30 | +[1] 2017/04/10 19:50:58.164302 [INF] STREAM: --------- Store Limits --------- |
| 31 | +[1] 2017/04/10 19:50:58.164311 [INF] STREAM: Channels: 100 * |
| 32 | +[1] 2017/04/10 19:50:58.164315 [INF] STREAM: -------- channels limits ------- |
| 33 | +[1] 2017/04/10 19:50:58.164321 [INF] STREAM: Subscriptions: 1000 * |
| 34 | +[1] 2017/04/10 19:50:58.164326 [INF] STREAM: Messages : 1000000 * |
| 35 | +[1] 2017/04/10 19:50:58.164337 [INF] STREAM: Bytes : 976.56 MB * |
| 36 | +[1] 2017/04/10 19:50:58.164341 [INF] STREAM: Age : unlimited * |
| 37 | +[1] 2017/04/10 19:50:58.164345 [INF] STREAM: -------------------------------- |
| 38 | +``` |
34 | 39 |
|
35 | 40 | To use a file based store instead, you would run:
|
36 | 41 |
|
| 42 | +```bash |
37 | 43 | $ docker run -d nats-streaming -store file -dir datastore
|
38 | 44 |
|
39 |
| -[1] 2017/01/19 20:28:45.169437 [INF] Starting nats-streaming-server[test-cluster] version 0.3.8 |
40 |
| -[1] 2017/01/19 20:28:45.169722 [INF] Starting nats-server version 0.9.6 |
41 |
| -[1] 2017/01/19 20:28:45.169748 [INF] Listening for client connections on 0.0.0.0:4222 |
42 |
| -[1] 2017/01/19 20:28:45.169816 [INF] Server is ready |
43 |
| -[1] 2017/01/19 20:28:45.449668 [INF] STAN: Message store is FILE |
44 |
| -[1] 2017/01/19 20:28:45.449705 [INF] STAN: --------- Store Limits --------- |
45 |
| -[1] 2017/01/19 20:28:45.449714 [INF] STAN: Channels: 100 * |
46 |
| -[1] 2017/01/19 20:28:45.449719 [INF] STAN: -------- channels limits ------- |
47 |
| -[1] 2017/01/19 20:28:45.449724 [INF] STAN: Subscriptions: 1000 * |
48 |
| -[1] 2017/01/19 20:28:45.449729 [INF] STAN: Messages : 1000000 * |
49 |
| -[1] 2017/01/19 20:28:45.449799 [INF] STAN: Bytes : 976.56 MB * |
50 |
| -[1] 2017/01/19 20:28:45.449805 [INF] STAN: Age : unlimited * |
51 |
| -[1] 2017/01/19 20:28:45.449828 [INF] STAN: -------------------------------- |
52 |
| - |
53 |
| -You can also connect to a remote NATS Server running in a docker image. |
54 |
| -First, run NATS Server: |
| 45 | +[1] 2017/04/10 19:52:05.223258 [INF] STREAM: Starting nats-streaming-server[test-cluster] version 0.4.0 |
| 46 | +[1] 2017/04/10 19:52:05.223300 [INF] STREAM: ServerID: QMSoDJFVKdMTahEpmE80gd |
| 47 | +[1] 2017/04/10 19:52:05.223329 [INF] STREAM: Go version: go1.7.5 |
| 48 | +[1] 2017/04/10 19:52:05.223489 [INF] Starting nats-server version 0.9.6 |
| 49 | +[1] 2017/04/10 19:52:05.223537 [INF] Listening for client connections on 0.0.0.0:4222 |
| 50 | +[1] 2017/04/10 19:52:05.223607 [INF] Server is ready |
| 51 | +[1] 2017/04/10 19:52:05.502165 [INF] STREAM: Message store is FILE |
| 52 | +[1] 2017/04/10 19:52:05.502208 [INF] STREAM: --------- Store Limits --------- |
| 53 | +[1] 2017/04/10 19:52:05.502266 [INF] STREAM: Channels: 100 * |
| 54 | +[1] 2017/04/10 19:52:05.502273 [INF] STREAM: -------- channels limits ------- |
| 55 | +[1] 2017/04/10 19:52:05.502279 [INF] STREAM: Subscriptions: 1000 * |
| 56 | +[1] 2017/04/10 19:52:05.502284 [INF] STREAM: Messages : 1000000 * |
| 57 | +[1] 2017/04/10 19:52:05.502303 [INF] STREAM: Bytes : 976.56 MB * |
| 58 | +[1] 2017/04/10 19:52:05.502308 [INF] STREAM: Age : unlimited * |
| 59 | +[1] 2017/04/10 19:52:05.502319 [INF] STREAM: -------------------------------- |
| 60 | +``` |
| 61 | + |
| 62 | +You can also connect to a remote NATS Server running in a docker image. First, run NATS Server: |
55 | 63 |
|
| 64 | +```bash |
56 | 65 | $ docker run -d --name=nats-main nats
|
| 66 | +``` |
57 | 67 |
|
58 | 68 | Now, start the Streaming server and link it to the above docker image:
|
59 | 69 |
|
| 70 | +```bash |
60 | 71 | $ docker run -d --link nats-main nats-streaming -store file -dir datastore -ns nats://nats-main:4222
|
61 | 72 |
|
62 |
| -[1] 2017/01/19 20:29:19.178044 [INF] Starting nats-streaming-server[test-cluster] version 0.3.8 |
63 |
| -[1] 2017/01/19 20:29:19.459272 [INF] STAN: Message store is FILE |
64 |
| -[1] 2017/01/19 20:29:19.459322 [INF] STAN: --------- Store Limits --------- |
65 |
| -[1] 2017/01/19 20:29:19.459336 [INF] STAN: Channels: 100 * |
66 |
| -[1] 2017/01/19 20:29:19.459343 [INF] STAN: -------- channels limits ------- |
67 |
| -[1] 2017/01/19 20:29:19.459351 [INF] STAN: Subscriptions: 1000 * |
68 |
| -[1] 2017/01/19 20:29:19.459375 [INF] STAN: Messages : 1000000 * |
69 |
| -[1] 2017/01/19 20:29:19.459396 [INF] STAN: Bytes : 976.56 MB * |
70 |
| -[1] 2017/01/19 20:29:19.459407 [INF] STAN: Age : unlimited * |
71 |
| -[1] 2017/01/19 20:29:19.459413 [INF] STAN: -------------------------------- |
72 |
| - |
| 73 | +[1] 2017/04/10 19:53:18.955779 [INF] STREAM: Starting nats-streaming-server[test-cluster] version 0.4.0 |
| 74 | +[1] 2017/04/10 19:53:18.955819 [INF] STREAM: ServerID: khzmxBZqJxIUuCn91PWKmB |
| 75 | +[1] 2017/04/10 19:53:18.955831 [INF] STREAM: Go version: go1.7.5 |
| 76 | +[1] 2017/04/10 19:53:19.306861 [INF] STREAM: Message store is FILE |
| 77 | +[1] 2017/04/10 19:53:19.306911 [INF] STREAM: --------- Store Limits --------- |
| 78 | +[1] 2017/04/10 19:53:19.306931 [INF] STREAM: Channels: 100 * |
| 79 | +[1] 2017/04/10 19:53:19.306946 [INF] STREAM: -------- channels limits ------- |
| 80 | +[1] 2017/04/10 19:53:19.306950 [INF] STREAM: Subscriptions: 1000 * |
| 81 | +[1] 2017/04/10 19:53:19.306953 [INF] STREAM: Messages : 1000000 * |
| 82 | +[1] 2017/04/10 19:53:19.306961 [INF] STREAM: Bytes : 976.56 MB * |
| 83 | +[1] 2017/04/10 19:53:19.306968 [INF] STREAM: Age : unlimited * |
| 84 | +[1] 2017/04/10 19:53:19.306971 [INF] STREAM: -------------------------------- |
| 85 | +``` |
73 | 86 |
|
74 | 87 | Notice that the output shows that the NATS Server was not started, as opposed to the first output.
|
75 | 88 |
|
76 |
| -``` |
77 |
| -
|
78 | 89 | # Commandline Options
|
79 | 90 |
|
80 | 91 | ```bash
|
81 | 92 | Streaming Server Options:
|
82 |
| - -cid, --cluster_id <cluster ID> Cluster ID (default: test-cluster) |
83 |
| - -st, --store <type> Store type: MEMORY|FILE (default: MEMORY) |
84 |
| - --dir <directory> For FILE store type, this is the root directory |
85 |
| - -mc, --max_channels <number> Max number of channels (0 for unlimited) |
86 |
| - -msu, --max_subs <number> Max number of subscriptions per channel (0 for unlimited) |
87 |
| - -mm, --max_msgs <number> Max number of messages per channel (0 for unlimited) |
88 |
| - -mb, --max_bytes <number> Max messages total size per channel (0 for unlimited) |
89 |
| - -ma, --max_age <seconds> Max duration a message can be stored ("0s" for unlimited) |
90 |
| - -ns, --nats_server <url> Connect to this external NATS Server (embedded otherwise) |
91 |
| - -sc, --stan_config <file> Streaming server configuration file |
| 93 | + -cid, --cluster_id <string> Cluster ID (default: test-cluster) |
| 94 | + -st, --store <string> Store type: MEMORY|FILE (default: MEMORY) |
| 95 | + --dir <string> For FILE store type, this is the root directory |
| 96 | + -mc, --max_channels <int> Max number of channels (0 for unlimited) |
| 97 | + -msu, --max_subs <int> Max number of subscriptions per channel (0 for unlimited) |
| 98 | + -mm, --max_msgs <int> Max number of messages per channel (0 for unlimited) |
| 99 | + -mb, --max_bytes <size> Max messages total size per channel (0 for unlimited) |
| 100 | + -ma, --max_age <duration> Max duration a message can be stored ("0s" for unlimited) |
| 101 | + -ns, --nats_server <string> Connect to this external NATS Server URL (embedded otherwise) |
| 102 | + -sc, --stan_config <string> Streaming server configuration file |
92 | 103 | -hbi, --hb_interval <duration> Interval at which server sends heartbeat to a client
|
93 | 104 | -hbt, --hb_timeout <duration> How long server waits for a heartbeat response
|
94 |
| - -hbf, --hb_fail_count <number> Number of failed heartbeats before server closes the client connection |
| 105 | + -hbf, --hb_fail_count <int> Number of failed heartbeats before server closes the client connection |
| 106 | + --ack_subs <int> Number of internal subscriptions handling incoming ACKs (0 means one per client's subscription) |
| 107 | + --ft_group <string> Name of the FT Group. A group can be 2 or more servers with a single active server and all sharing the same datastore. |
95 | 108 |
|
96 | 109 | Streaming Server File Store Options:
|
97 |
| - --file_compact_enabled Enable file compaction |
98 |
| - --file_compact_frag File fragmentation threshold for compaction |
99 |
| - --file_compact_interval <int> Minimum interval (in seconds) between file compactions |
100 |
| - --file_compact_min_size <int> Minimum file size for compaction |
101 |
| - --file_buffer_size <int> File buffer size (in bytes) |
102 |
| - --file_crc Enable file CRC-32 checksum |
103 |
| - --file_crc_poly <int> Polynomial used to make the table used for CRC-32 checksum |
104 |
| - --file_sync Enable File.Sync on Flush |
105 |
| - --file_slice_max_msgs Maximum number of messages per file slice (subject to channel limits) |
106 |
| - --file_slice_max_bytes Maximum file slice size - including index file (subject to channel limits) |
107 |
| - --file_slice_max_age Maximum file slice duration starting when the first message is stored (subject to channel limits) |
108 |
| - --file_slice_archive_script Path to script to use if you want to archive a file slice being removed |
| 110 | + --file_compact_enabled <bool> Enable file compaction |
| 111 | + --file_compact_frag <int> File fragmentation threshold for compaction |
| 112 | + --file_compact_interval <int> Minimum interval (in seconds) between file compactions |
| 113 | + --file_compact_min_size <size> Minimum file size for compaction |
| 114 | + --file_buffer_size <size> File buffer size (in bytes) |
| 115 | + --file_crc <bool> Enable file CRC-32 checksum |
| 116 | + --file_crc_poly <int> Polynomial used to make the table used for CRC-32 checksum |
| 117 | + --file_sync <bool> Enable File.Sync on Flush |
| 118 | + --file_slice_max_msgs <int> Maximum number of messages per file slice (subject to channel limits) |
| 119 | + --file_slice_max_bytes <size> Maximum file slice size - including index file (subject to channel limits) |
| 120 | + --file_slice_max_age <duration> Maximum file slice duration starting when the first message is stored (subject to channel limits) |
| 121 | + --file_slice_archive_script <string> Path to script to use if you want to archive a file slice being removed |
| 122 | + --file_fds_limit <int> Store will try to use no more file descriptors than this given limit |
109 | 123 |
|
110 | 124 | Streaming Server TLS Options:
|
111 |
| - -secure Use a TLS connection to the NATS server without |
| 125 | + -secure <bool> Use a TLS connection to the NATS server without |
112 | 126 | verification; weaker than specifying certificates.
|
113 |
| - -tls_client_key Client key for the streaming server |
114 |
| - -tls_client_cert Client certificate for the streaming server |
115 |
| - -tls_client_cacert Client certificate CA for the streaming server |
| 127 | + -tls_client_key <string> Client key for the streaming server |
| 128 | + -tls_client_cert <string> Client certificate for the streaming server |
| 129 | + -tls_client_cacert <string> Client certificate CA for the streaming server |
116 | 130 |
|
117 | 131 | Streaming Server Logging Options:
|
118 |
| - -SD, --stan_debug Enable STAN debugging output |
119 |
| - -SV, --stan_trace Trace the raw STAN protocol |
| 132 | + -SD, --stan_debug=<bool> Enable STAN debugging output |
| 133 | + -SV, --stan_trace=<bool> Trace the raw STAN protocol |
120 | 134 | -SDV Debug and trace STAN
|
121 | 135 | (See additional NATS logging options below)
|
122 | 136 |
|
123 | 137 | Embedded NATS Server Options:
|
124 |
| - -a, --addr <host> Bind to host address (default: 0.0.0.0) |
125 |
| - -p, --port <port> Use port for clients (default: 4222) |
126 |
| - -P, --pid <file> File to store PID |
127 |
| - -m, --http_port <port> Use port for http monitoring |
128 |
| - -ms,--https_port <port> Use port for https monitoring |
129 |
| - -c, --config <file> Configuration file |
| 138 | + -a, --addr <string> Bind to host address (default: 0.0.0.0) |
| 139 | + -p, --port <int> Use port for clients (default: 4222) |
| 140 | + -P, --pid <string> File to store PID |
| 141 | + -m, --http_port <int> Use port for http monitoring |
| 142 | + -ms,--https_port <int> Use port for https monitoring |
| 143 | + -c, --config <string> Configuration file |
130 | 144 |
|
131 | 145 | Logging Options:
|
132 |
| - -l, --log <file> File to redirect log output |
133 |
| - -T, --logtime Timestamp log entries (default: true) |
134 |
| - -s, --syslog Enable syslog as log method |
135 |
| - -r, --remote_syslog <addr> Syslog server addr (udp://localhost:514) |
136 |
| - -D, --debug Enable debugging output |
137 |
| - -V, --trace Trace the raw protocol |
| 146 | + -l, --log <string> File to redirect log output |
| 147 | + -T, --logtime=<bool> Timestamp log entries (default: true) |
| 148 | + -s, --syslog <string> Enable syslog as log method |
| 149 | + -r, --remote_syslog <string> Syslog server addr (udp://localhost:514) |
| 150 | + -D, --debug=<bool> Enable debugging output |
| 151 | + -V, --trace=<bool> Trace the raw protocol |
138 | 152 | -DV Debug and trace
|
139 | 153 |
|
140 | 154 | Authorization Options:
|
141 |
| - --user <user> User required for connections |
142 |
| - --pass <password> Password required for connections |
143 |
| - --auth <token> Authorization token required for connections |
| 155 | + --user <string> User required for connections |
| 156 | + --pass <string> Password required for connections |
| 157 | + --auth <string> Authorization token required for connections |
144 | 158 |
|
145 | 159 | TLS Options:
|
146 |
| - --tls Enable TLS, do not verify clients (default: false) |
147 |
| - --tlscert <file> Server certificate file |
148 |
| - --tlskey <file> Private key for server certificate |
149 |
| - --tlsverify Enable TLS, verify client certificates |
150 |
| - --tlscacert <file> Client certificate CA for verification |
| 160 | + --tls=<bool> Enable TLS, do not verify clients (default: false) |
| 161 | + --tlscert <string> Server certificate file |
| 162 | + --tlskey <string> Private key for server certificate |
| 163 | + --tlsverify=<bool> Enable TLS, verify client certificates |
| 164 | + --tlscacert <string> Client certificate CA for verification |
151 | 165 |
|
152 | 166 | NATS Clustering Options:
|
153 |
| - --routes <rurl-1, rurl-2> Routes to solicit and connect |
154 |
| - --cluster <cluster-url> Cluster URL for solicited routes |
| 167 | + --routes <string, ...> Routes to solicit and connect |
| 168 | + --cluster <string> Cluster URL for solicited routes |
155 | 169 |
|
156 | 170 | Common Options:
|
157 | 171 | -h, --help Show this message
|
|
0 commit comments