From a2b912c23dc07122dc469742fdba3a03874c80ae Mon Sep 17 00:00:00 2001 From: Ivan Kozlovic Date: Wed, 19 Oct 2016 14:39:23 -0600 Subject: [PATCH] [nats-streaming] Update to version v0.3.0 --- nats-streaming/content.md | 65 ++++++++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 14 deletions(-) diff --git a/nats-streaming/content.md b/nats-streaming/content.md index 7fcd223d6..9515f185d 100644 --- a/nats-streaming/content.md +++ b/nats-streaming/content.md @@ -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 (default: test-cluster) -st, --store Store type: MEMORY|FILE (default: MEMORY) --dir For FILE store type, this is the root directory - -mc, --max_channels Max number of channels (aka subjects, topics, etc...) - -msu, --max_subs Max number of subscriptions per channel - -mm, --max_msgs Max number of messages per channel - -mb, --max_bytes Max messages total size per channel + -mc, --max_channels Max number of channels (0 for unlimited) + -msu, --max_subs Max number of subscriptions per channel (0 for unlimited) + -mm, --max_msgs Max number of messages per channel (0 for unlimited) + -mb, --max_bytes Max messages total size per channel (0 for unlimited) + -ma, --max_age Max duration a message can be stored ("0s" for unlimited) -ns, --nats_server Connect to this external NATS Server (embedded otherwise) + -sc, --stan_config 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 Minimum interval (in seconds) between file compactions + --file_compact_min_size Minimum file size for compaction + --file_buffer_size File buffer size (in bytes) + --file_crc Enable file CRC-32 checksum + --file_crc_poly 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)