@@ -66,59 +66,59 @@ $ docker run -d -p 4222:4222 -p 8222:8222 %%IMAGE%%
66
66
Output that you would get if you had started with ` -ti ` instead of ` d ` (for daemon):
67
67
68
68
``` bash
69
- [1] 2020/02/11 19:45:55.379789 [INF] STREAM: Starting nats-streaming-server[test-cluster] version 0.17 .0
70
- [1] 2020/02/11 19:45:55.379864 [INF] STREAM: ServerID: oe3fSgSCIfkPnbGvQch6k9
71
- [1] 2020/02/11 19:45:55.379867 [INF] STREAM: Go version: go1.13.7
72
- [1] 2020/02/11 19:45:55.379869 [INF] STREAM: Git commit: [f4b7190 ]
73
- [1] 2020/02/11 19:45:55.380454 [INF] Starting nats-server version 2.1.4
74
- [1] 2020/02/11 19:45:55.380461 [INF] Git commit [fb009af ]
75
- [1] 2020/02/11 19:45:55.380619 [INF] Starting http monitor on 0.0.0.0:8222
76
- [1] 2020/02/11 19:45:55.380659 [INF] Listening for client connections on 0.0.0.0:4222
77
- [1] 2020/02/11 19:45:55.380662 [INF] Server id is NCIJ5WZMDXD3SRQFXAZNMO4C4BMEKVTZA33WLG4VPP7LRE37KIB5D4FX
78
- [1] 2020/02/11 19:45:55.380664 [INF] Server is ready
79
- [1] 2020/02/11 19:45:55.407105 [INF] STREAM: Recovering the state...
80
- [1] 2020/02/11 19:45:55.407113 [INF] STREAM: No recovered state
81
- [1] 2020/02/11 19:45:55.662310 [INF] STREAM: Message store is MEMORY
82
- [1] 2020/02/11 19:45:55.662347 [INF] STREAM: ---------- Store Limits ----------
83
- [1] 2020/02/11 19:45:55.662351 [INF] STREAM: Channels: 100 *
84
- [1] 2020/02/11 19:45:55.662355 [INF] STREAM: --------- Channels Limits --------
85
- [1] 2020/02/11 19:45:55.662358 [INF] STREAM: Subscriptions: 1000 *
86
- [1] 2020/02/11 19:45:55.662361 [INF] STREAM: Messages : 1000000 *
87
- [1] 2020/02/11 19:45:55.662364 [INF] STREAM: Bytes : 976.56 MB *
88
- [1] 2020/02/11 19:45:55.662367 [INF] STREAM: Age : unlimited *
89
- [1] 2020/02/11 19:45:55.662370 [INF] STREAM: Inactivity : unlimited *
90
- [1] 2020/02/11 19:45:55.662374 [INF] STREAM: ----------------------------------
91
- [1] 2020/02/11 19:45:55.662377 [INF] STREAM: Streaming Server is ready
69
+ [1] 2021/01/09 02:33:27.598398 [INF] STREAM: Starting nats-streaming-server[test-cluster] version 0.20 .0
70
+ [1] 2021/01/09 02:33:27.598450 [INF] STREAM: ServerID: wle5yqWHfM3u7pyr2cZxMl
71
+ [1] 2021/01/09 02:33:27.598453 [INF] STREAM: Go version: go1.15.6
72
+ [1] 2021/01/09 02:33:27.598455 [INF] STREAM: Git commit: [f158dba ]
73
+ [1] 2021/01/09 02:33:27.599262 [INF] Starting nats-server version 2.1.9
74
+ [1] 2021/01/09 02:33:27.599282 [INF] Git commit [7c76626 ]
75
+ [1] 2021/01/09 02:33:27.599633 [INF] Starting http monitor on 0.0.0.0:8222
76
+ [1] 2021/01/09 02:33:27.599780 [INF] Listening for client connections on 0.0.0.0:4222
77
+ [1] 2021/01/09 02:33:27.599887 [INF] Server id is NBCYTAYHQW2ZJWZ2MWOZ4OR5TXX7SIOW76NBWFPQVY4LENFF4Z6BBDWV
78
+ [1] 2021/01/09 02:33:27.599890 [INF] Server is ready
79
+ [1] 2021/01/09 02:33:27.628282 [INF] STREAM: Recovering the state...
80
+ [1] 2021/01/09 02:33:27.628410 [INF] STREAM: No recovered state
81
+ [1] 2021/01/09 02:33:27.880289 [INF] STREAM: Message store is MEMORY
82
+ [1] 2021/01/09 02:33:27.880337 [INF] STREAM: ---------- Store Limits ----------
83
+ [1] 2021/01/09 02:33:27.880343 [INF] STREAM: Channels: 100 *
84
+ [1] 2021/01/09 02:33:27.880348 [INF] STREAM: --------- Channels Limits --------
85
+ [1] 2021/01/09 02:33:27.880352 [INF] STREAM: Subscriptions: 1000 *
86
+ [1] 2021/01/09 02:33:27.880356 [INF] STREAM: Messages : 1000000 *
87
+ [1] 2021/01/09 02:33:27.880360 [INF] STREAM: Bytes : 976.56 MB *
88
+ [1] 2021/01/09 02:33:27.880431 [INF] STREAM: Age : unlimited *
89
+ [1] 2021/01/09 02:33:27.880616 [INF] STREAM: Inactivity : unlimited *
90
+ [1] 2021/01/09 02:33:27.880646 [INF] STREAM: ----------------------------------
91
+ [1] 2021/01/09 02:33:27.880651 [INF] STREAM: Streaming Server is ready
92
92
```
93
93
94
94
To use a file based store instead, you would run:
95
95
96
96
``` bash
97
97
$ docker run -d -p 4222:4222 -p 8222:8222 %%IMAGE%% -store file -dir datastore
98
98
99
- [1] 2020/02/11 19:46:24.891825 [INF] STREAM: Starting nats-streaming-server[test-cluster] version 0.17 .0
100
- [1] 2020/02/11 19:46:24.891863 [INF] STREAM: ServerID: y2zpmpnNLbnnLX4RGpW4HT
101
- [1] 2020/02/11 19:46:24.891866 [INF] STREAM: Go version: go1.13.7
102
- [1] 2020/02/11 19:46:24.891868 [INF] STREAM: Git commit: [f4b7190 ]
103
- [1] 2020/02/11 19:46:24.892633 [INF] Starting nats-server version 2.1.4
104
- [1] 2020/02/11 19:46:24.892653 [INF] Git commit [fb009af ]
105
- [1] 2020/02/11 19:46:24.892837 [INF] Listening for client connections on 0.0.0.0:4222
106
- [1] 2020/02/11 19:46:24.892857 [INF] Server id is NAB5BC4I4DY7UQ3NJVRYVSZ66SWMWQYCHMMMVO4KZDZU3WUDOBQZYH52
107
- [1] 2020/02/11 19:46:24.892860 [INF] Server is ready
108
- [1] 2020/02/11 19:46:24.919546 [INF] STREAM: Recovering the state...
109
- [1] 2020/02/11 19:46:24.919685 [INF] STREAM: No recovered state
110
- [1] 2020/02/11 19:46:25.170492 [INF] STREAM: Message store is FILE
111
- [1] 2020/02/11 19:46:25.170536 [INF] STREAM: Store location: datastore
112
- [1] 2020/02/11 19:46:25.170563 [INF] STREAM: ---------- Store Limits ----------
113
- [1] 2020/02/11 19:46:25.170602 [INF] STREAM: Channels: 100 *
114
- [1] 2020/02/11 19:46:25.170608 [INF] STREAM: --------- Channels Limits --------
115
- [1] 2020/02/11 19:46:25.170611 [INF] STREAM: Subscriptions: 1000 *
116
- [1] 2020/02/11 19:46:25.170614 [INF] STREAM: Messages : 1000000 *
117
- [1] 2020/02/11 19:46:25.170618 [INF] STREAM: Bytes : 976.56 MB *
118
- [1] 2020/02/11 19:46:25.170621 [INF] STREAM: Age : unlimited *
119
- [1] 2020/02/11 19:46:25.170624 [INF] STREAM: Inactivity : unlimited *
120
- [1] 2020/02/11 19:46:25.170627 [INF] STREAM: ----------------------------------
121
- [1] 2020/02/11 19:46:25.170630 [INF] STREAM: Streaming Server is ready
99
+ [1] 2021/01/09 02:33:50.099413 [INF] STREAM: Starting nats-streaming-server[test-cluster] version 0.20 .0
100
+ [1] 2021/01/09 02:33:50.099559 [INF] STREAM: ServerID: ntGF2a7jppxgD432QR8srZ
101
+ [1] 2021/01/09 02:33:50.099906 [INF] STREAM: Go version: go1.15.6
102
+ [1] 2021/01/09 02:33:50.100048 [INF] STREAM: Git commit: [f158dba ]
103
+ [1] 2021/01/09 02:33:50.101328 [INF] Starting nats-server version 2.1.9
104
+ [1] 2021/01/09 02:33:50.101387 [INF] Git commit [7c76626 ]
105
+ [1] 2021/01/09 02:33:50.101635 [INF] Listening for client connections on 0.0.0.0:4222
106
+ [1] 2021/01/09 02:33:50.101656 [INF] Server id is NBF5UTWHD66QHACRHGLQRK4F5UJ22UTGMBX643ZHDC6A3J5DWLV5FMML
107
+ [1] 2021/01/09 02:33:50.101659 [INF] Server is ready
108
+ [1] 2021/01/09 02:33:50.127998 [INF] STREAM: Recovering the state...
109
+ [1] 2021/01/09 02:33:50.128115 [INF] STREAM: No recovered state
110
+ [1] 2021/01/09 02:33:50.378689 [INF] STREAM: Message store is FILE
111
+ [1] 2021/01/09 02:33:50.378699 [INF] STREAM: Store location: datastore
112
+ [1] 2021/01/09 02:33:50.378713 [INF] STREAM: ---------- Store Limits ----------
113
+ [1] 2021/01/09 02:33:50.378730 [INF] STREAM: Channels: 100 *
114
+ [1] 2021/01/09 02:33:50.378733 [INF] STREAM: --------- Channels Limits --------
115
+ [1] 2021/01/09 02:33:50.378734 [INF] STREAM: Subscriptions: 1000 *
116
+ [1] 2021/01/09 02:33:50.378735 [INF] STREAM: Messages : 1000000 *
117
+ [1] 2021/01/09 02:33:50.378736 [INF] STREAM: Bytes : 976.56 MB *
118
+ [1] 2021/01/09 02:33:50.378737 [INF] STREAM: Age : unlimited *
119
+ [1] 2021/01/09 02:33:50.378738 [INF] STREAM: Inactivity : unlimited *
120
+ [1] 2021/01/09 02:33:50.378740 [INF] STREAM: ----------------------------------
121
+ [1] 2021/01/09 02:33:50.378741 [INF] STREAM: Streaming Server is ready
122
122
```
123
123
124
124
You can also connect to a remote NATS Server running in a docker image. First, run NATS Server:
@@ -132,24 +132,24 @@ Now, start the Streaming server and link it to the above docker image:
132
132
``` bash
133
133
$ docker run -d --link nats-main %%IMAGE%% -store file -dir datastore -ns nats://nats-main:4222
134
134
135
- [1] 2020/02/11 19:46:40.206660 [INF] STREAM: Starting nats-streaming-server[test-cluster] version 0.17 .0
136
- [1] 2020/02/11 19:46:40.206699 [INF] STREAM: ServerID: bon7pyyeNH4ClntI1fCJos
137
- [1] 2020/02/11 19:46:40.206702 [INF] STREAM: Go version: go1.13.7
138
- [1] 2020/02/11 19:46:40.206704 [INF] STREAM: Git commit: [f4b7190 ]
139
- [1] 2020/02/11 19:46:40.233833 [INF] STREAM: Recovering the state...
140
- [1] 2020/02/11 19:46:40.233992 [INF] STREAM: No recovered state
141
- [1] 2020/02/11 19:46:40.487836 [INF] STREAM: Message store is FILE
142
- [1] 2020/02/11 19:46:40.487845 [INF] STREAM: Store location: datastore
143
- [1] 2020/02/11 19:46:40.487884 [INF] STREAM: ---------- Store Limits ----------
144
- [1] 2020/02/11 19:46:40.487963 [INF] STREAM: Channels: 100 *
145
- [1] 2020/02/11 19:46:40.487966 [INF] STREAM: --------- Channels Limits --------
146
- [1] 2020/02/11 19:46:40.487968 [INF] STREAM: Subscriptions: 1000 *
147
- [1] 2020/02/11 19:46:40.487993 [INF] STREAM: Messages : 1000000 *
148
- [1] 2020/02/11 19:46:40.487995 [INF] STREAM: Bytes : 976.56 MB *
149
- [1] 2020/02/11 19:46:40.488023 [INF] STREAM: Age : unlimited *
150
- [1] 2020/02/11 19:46:40.488025 [INF] STREAM: Inactivity : unlimited *
151
- [1] 2020/02/11 19:46:40.488027 [INF] STREAM: ----------------------------------
152
- [1] 2020/02/11 19:46:40.488029 [INF] STREAM: Streaming Server is ready
135
+ [1] 2021/01/09 02:34:07.768444 [INF] STREAM: Starting nats-streaming-server[test-cluster] version 0.20 .0
136
+ [1] 2021/01/09 02:34:07.768481 [INF] STREAM: ServerID: Fiubmg5F21FK2J6YwpJ1lP
137
+ [1] 2021/01/09 02:34:07.768483 [INF] STREAM: Go version: go1.15.6
138
+ [1] 2021/01/09 02:34:07.768485 [INF] STREAM: Git commit: [f158dba ]
139
+ [1] 2021/01/09 02:34:07.796117 [INF] STREAM: Recovering the state...
140
+ [1] 2021/01/09 02:34:07.796247 [INF] STREAM: No recovered state
141
+ [1] 2021/01/09 02:34:08.046945 [INF] STREAM: Message store is FILE
142
+ [1] 2021/01/09 02:34:08.047008 [INF] STREAM: Store location: datastore
143
+ [1] 2021/01/09 02:34:08.047076 [INF] STREAM: ---------- Store Limits ----------
144
+ [1] 2021/01/09 02:34:08.047111 [INF] STREAM: Channels: 100 *
145
+ [1] 2021/01/09 02:34:08.047130 [INF] STREAM: --------- Channels Limits --------
146
+ [1] 2021/01/09 02:34:08.047143 [INF] STREAM: Subscriptions: 1000 *
147
+ [1] 2021/01/09 02:34:08.047155 [INF] STREAM: Messages : 1000000 *
148
+ [1] 2021/01/09 02:34:08.047221 [INF] STREAM: Bytes : 976.56 MB *
149
+ [1] 2021/01/09 02:34:08.047226 [INF] STREAM: Age : unlimited *
150
+ [1] 2021/01/09 02:34:08.047231 [INF] STREAM: Inactivity : unlimited *
151
+ [1] 2021/01/09 02:34:08.047235 [INF] STREAM: ----------------------------------
152
+ [1] 2021/01/09 02:34:08.047239 [INF] STREAM: Streaming Server is ready
153
153
```
154
154
155
155
Notice that the output shows that the NATS Server was not started, as opposed to the first output.
@@ -173,22 +173,24 @@ Streaming Server Options:
173
173
-hbt, --hb_timeout < duration> How long server waits for a heartbeat response
174
174
-hbf, --hb_fail_count < int> Number of failed heartbeats before server closes the client connection
175
175
--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
176
- -sl, --signal < signal> [=< pid> ] Send signal to nats-streaming-server process (stop, quit, reopen)
176
+ -sl, --signal < signal> [=< pid> ] Send signal to nats-streaming-server process (stop, quit, reopen, reload - only for embedded NATS Server )
177
177
--encrypt < bool> Specify if server should use encryption at rest
178
178
--encryption_cipher < string> Cipher to use for encryption. Currently support AES and CHAHA (ChaChaPoly). Defaults to AES
179
179
--encryption_key < string> Encryption Key. It is recommended to specify it through the NATS_STREAMING_ENCRYPTION_KEY environment variable instead
180
-
180
+ --replace_durable < bool> Replace the existing durable subscription instead of reporting a duplicate durable error
181
+
181
182
Streaming Server Clustering Options:
182
- --clustered < bool> Run the server in a clustered configuration (default: false)
183
- --cluster_node_id < string> ID of the node within the cluster if there is no stored ID (default: random UUID)
184
- --cluster_bootstrap < bool> Bootstrap the cluster if there is no existing state by electing self as leader (default: false)
185
- --cluster_peers < string, ...> Comma separated list of cluster peer node IDs to bootstrap cluster state
186
- --cluster_log_path < string> Directory to store log replication data
187
- --cluster_log_cache_size < int> Number of log entries to cache in memory to reduce disk IO (default: 512)
188
- --cluster_log_snapshots < int> Number of log snapshots to retain (default: 2)
189
- --cluster_trailing_logs < int> Number of log entries to leave after a snapshot and compaction
190
- --cluster_sync < bool> Do a file sync after every write to the replication log and message store
191
- --cluster_raft_logging < bool> Enable logging from the Raft library (disabled by default)
183
+ --clustered < bool> Run the server in a clustered configuration (default: false)
184
+ --cluster_node_id < string> ID of the node within the cluster if there is no stored ID (default: random UUID)
185
+ --cluster_bootstrap < bool> Bootstrap the cluster if there is no existing state by electing self as leader (default: false)
186
+ --cluster_peers < string, ...> Comma separated list of cluster peer node IDs to bootstrap cluster state
187
+ --cluster_log_path < string> Directory to store log replication data
188
+ --cluster_log_cache_size < int> Number of log entries to cache in memory to reduce disk IO (default: 512)
189
+ --cluster_log_snapshots < int> Number of log snapshots to retain (default: 2)
190
+ --cluster_trailing_logs < int> Number of log entries to leave after a snapshot and compaction
191
+ --cluster_sync < bool> Do a file sync after every write to the replication log and message store
192
+ --cluster_raft_logging < bool> Enable logging from the Raft library (disabled by default)
193
+ --cluster_allow_add_remove_node < bool> Enable the ability to send NATS requests to the leader to add/remove cluster nodes
192
194
193
195
Streaming Server File Store Options:
194
196
--file_compact_enabled < bool> Enable file compaction
@@ -214,6 +216,7 @@ Streaming Server SQL Store Options:
214
216
--sql_source <string> Datasource used when opening an SQL connection to the database
215
217
--sql_no_caching <bool> Enable/Disable caching for improved performance
216
218
--sql_max_open_conns <int> Maximum number of opened connections to the database
219
+ --sql_bulk_insert_limit <int> Maximum number of messages stored with a single SQL "INSERT" statement
217
220
218
221
Streaming Server TLS Options:
219
222
-secure <bool> Use a TLS connection to the NATS server without
@@ -240,7 +243,7 @@ Embedded NATS Server Options:
240
243
Logging Options:
241
244
-l, --log <string> File to redirect log output
242
245
-T, --logtime=<bool> Timestamp log entries (default: true)
243
- -s, --syslog <string> Enable syslog as log method
246
+ -s, --syslog <bool> Enable syslog as log method
244
247
-r, --remote_syslog <string> Syslog server addr (udp://localhost:514)
245
248
-D, --debug=<bool> Enable debugging output
246
249
-V, --trace=<bool> Trace the raw protocol
0 commit comments