From 83fe06f93e9916d49d9c3aaed210ebb0e73cc06e Mon Sep 17 00:00:00 2001 From: Ginger Collison Date: Mon, 15 Jul 2019 17:19:34 -0500 Subject: [PATCH 1/3] Update README.md --- leafnodes/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/leafnodes/README.md b/leafnodes/README.md index 93037d6..279627c 100644 --- a/leafnodes/README.md +++ b/leafnodes/README.md @@ -87,6 +87,18 @@ leafnodes { ``` Note the leaf node configuration lists a number of `remotes`. The `url` specifies the port on the server where leaf node connections are allowed. The `credentials` configuration specifies the path to a user's credentials file. +The leaf server configuration (leaf.conf) also supports multiple URLs with `urls` such as the following: +```text +port: 4111 +leafnodes { + remotes = [ + { urls: nats-leaf://host1:4000, nats-leaf://host2:4000, + credentials: /Users/synadia/.nkeys/O/accounts/A/users/leaf.creds + }, + ] +} +``` + Create a subscriber on the leaf: ```text > nats-sub -s localhost:4111 ">" From 511c8f91572f81847d3788e95dbc4072e4981fb9 Mon Sep 17 00:00:00 2001 From: Ginger Collison Date: Tue, 16 Jul 2019 16:42:18 -0500 Subject: [PATCH 2/3] updates based on Ivan's re-write --- leafnodes/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/leafnodes/README.md b/leafnodes/README.md index 279627c..fe3a99e 100644 --- a/leafnodes/README.md +++ b/leafnodes/README.md @@ -79,8 +79,8 @@ Create the leaf server configuration (leaf.conf) with the following contents: port: 4111 leafnodes { remotes = [ - { url: nats-leaf://localhost:4000, - credentials: /Users/synadia/.nkeys/O/accounts/A/users/leaf.creds + { url: [nats-leaf://localhost:4000] + credentials: "/Users/synadia/.nkeys/O/accounts/A/users/leaf.creds" }, ] } @@ -92,8 +92,8 @@ The leaf server configuration (leaf.conf) also supports multiple URLs with `urls port: 4111 leafnodes { remotes = [ - { urls: nats-leaf://host1:4000, nats-leaf://host2:4000, - credentials: /Users/synadia/.nkeys/O/accounts/A/users/leaf.creds + { urls: [nats-leaf://host1:4000, nats-leaf://host2:4000] + credentials: "/Users/synadia/.nkeys/O/accounts/A/users/leaf.creds" }, ] } From 86bab99a40ae64b07a1fc852bf251178917fd803 Mon Sep 17 00:00:00 2001 From: Ginger Collison Date: Tue, 16 Jul 2019 16:59:38 -0500 Subject: [PATCH 3/3] Take 2 --- leafnodes/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/leafnodes/README.md b/leafnodes/README.md index fe3a99e..eb54847 100644 --- a/leafnodes/README.md +++ b/leafnodes/README.md @@ -79,7 +79,8 @@ Create the leaf server configuration (leaf.conf) with the following contents: port: 4111 leafnodes { remotes = [ - { url: [nats-leaf://localhost:4000] + { + url: "nats-leaf://localhost:4000" credentials: "/Users/synadia/.nkeys/O/accounts/A/users/leaf.creds" }, ] @@ -92,8 +93,9 @@ The leaf server configuration (leaf.conf) also supports multiple URLs with `urls port: 4111 leafnodes { remotes = [ - { urls: [nats-leaf://host1:4000, nats-leaf://host2:4000] - credentials: "/Users/synadia/.nkeys/O/accounts/A/users/leaf.creds" + { + urls: ["nats-leaf://host1:4000", "nats-leaf://host2:4000"] + credentials: "/Users/synadia/.nkeys/O/accounts/A/users/leaf.creds" }, ] }