[nats-streaming] Update to version v0.3.0

This commit is contained in:
Ivan Kozlovic 2016-10-19 14:39:23 -06:00
parent 8003086645
commit a2b912c23d
1 changed files with 51 additions and 14 deletions

View File

@ -17,25 +17,37 @@ $ docker run -d nats-streaming
Output that you would get if you had started with `-ti` instead of `d` (for daemon):
[INF] Starting nats-streaming-server[test-cluster] version 0.2.2
[INF] Starting nats-server version 0.9.2
[INF] Starting http monitor on :8222
[INF] Starting nats-streaming-server[test-cluster] version 0.3.0
[INF] Starting nats-server version 0.9.4
[INF] Listening for client connections on 0.0.0.0:4222
[INF] Server is ready
[INF] STAN: Message store is MEMORY
[INF] STAN: Maximum of 1000000 will be stored
[INF] STAN: --------- Store Limits ---------
[INF] STAN: Channels: 100 *
[INF] STAN: -------- channels limits -------
[INF] STAN: Subscriptions: 1000 *
[INF] STAN: Messages : 1000000 *
[INF] STAN: Bytes : 976.56 MB *
[INF] STAN: Age : unlimited *
[INF] STAN: --------------------------------
To use a file based store instead, you would run:
$ docker run -d nats-streaming -store file -dir datastore
[INF] Starting nats-streaming-server[test-cluster] version 0.2.2
[INF] Starting nats-server version 0.9.2
[INF] Starting http monitor on :8222
[INF] Starting nats-streaming-server[test-cluster] version 0.3.0
[INF] Starting nats-server version 0.9.4
[INF] Listening for client connections on 0.0.0.0:4222
[INF] Server is ready
[INF] STAN: Message store is FILE
[INF] STAN: Maximum of 1000000 will be stored
[INF] STAN: --------- Store Limits ---------
[INF] STAN: Channels: 100 *
[INF] STAN: -------- channels limits -------
[INF] STAN: Subscriptions: 1000 *
[INF] STAN: Messages : 1000000 *
[INF] STAN: Bytes : 976.56 MB *
[INF] STAN: Age : unlimited *
[INF] STAN: --------------------------------
You can also connect to a remote NATS Server running in a docker image.
First, run NATS Server:
@ -46,9 +58,17 @@ Now, start the Streaming server and link it to the above docker image:
$ docker run -d --link nats-main nats-streaming -ns nats://nats-main:4222
[INF] Starting nats-streaming-server[test-cluster] version 0.2.2
[INF] Starting nats-streaming-server[test-cluster] version 0.3.0
[INF] Server is ready
[INF] STAN: Message store is MEMORY
[INF] STAN: Maximum of 1000000 will be stored
[INF] STAN: --------- Store Limits ---------
[INF] STAN: Channels: 100 *
[INF] STAN: -------- channels limits -------
[INF] STAN: Subscriptions: 1000 *
[INF] STAN: Messages : 1000000 *
[INF] STAN: Bytes : 976.56 MB *
[INF] STAN: Age : unlimited *
[INF] STAN: --------------------------------
Notice that the output shows that the NATS Server was not started, as opposed to the first output.
@ -61,11 +81,24 @@ Streaming Server Options:
-cid, --cluster_id <cluster ID> Cluster ID (default: test-cluster)
-st, --store <type> Store type: MEMORY|FILE (default: MEMORY)
--dir <directory> For FILE store type, this is the root directory
-mc, --max_channels <number> Max number of channels (aka subjects, topics, etc...)
-msu, --max_subs <number> Max number of subscriptions per channel
-mm, --max_msgs <number> Max number of messages per channel
-mb, --max_bytes <number> Max messages total size per channel
-mc, --max_channels <number> Max number of channels (0 for unlimited)
-msu, --max_subs <number> Max number of subscriptions per channel (0 for unlimited)
-mm, --max_msgs <number> Max number of messages per channel (0 for unlimited)
-mb, --max_bytes <number> Max messages total size per channel (0 for unlimited)
-ma, --max_age <seconds> Max duration a message can be stored ("0s" for unlimited)
-ns, --nats_server <url> Connect to this external NATS Server (embedded otherwise)
-sc, --stan_config <file> Streaming server configuration file
Streaming Server File Store Options:
--file_compact_enabled Enable file compaction
--file_compact_frag File fragmentation threshold for compaction
--file_compact_interval <int> Minimum interval (in seconds) between file compactions
--file_compact_min_size <int> Minimum file size for compaction
--file_buffer_size <int> File buffer size (in bytes)
--file_crc Enable file CRC-32 checksum
--file_crc_poly <int> Polynomial used to make the table used for CRC-32 checksum
--file_sync Enable File.Sync on Flush
--file_cache Enable messages caching
Streaming Server TLS Options:
-secure Use a TLS connection to the NATS server without
@ -118,3 +151,7 @@ Common Options:
-v, --version Show version
--help_tls TLS help.
```
# Configuration
Details on how to configure further the NATS Streaming server can be found [here](https://github.com/nats-io/nats-streaming-server#configuring)