1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00

updating docs

This commit is contained in:
ainsley
2019-08-13 09:27:52 -05:00
parent 1c3833b7e1
commit 032f3cd171
152 changed files with 180 additions and 177 deletions

View File

@@ -2401,7 +2401,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Acknowledgements","level":"7.7","depth":1,"next":{"title":"The Streaming Protocol","level":"7.8","depth":1,"path":"developer/streaming/protocol.md","ref":"developer/streaming/protocol.md","articles":[]},"previous":{"title":"Queue Subscriptions","level":"7.6","depth":1,"path":"developer/streaming/queues.md","ref":"developer/streaming/queues.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/acks.md","mtime":"2019-05-30T22:52:52.236Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-07-25T22:29:27.003Z"},"basePath":"../..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Acknowledgements","level":"7.7","depth":1,"next":{"title":"The Streaming Protocol","level":"7.8","depth":1,"path":"developer/streaming/protocol.md","ref":"developer/streaming/protocol.md","articles":[]},"previous":{"title":"Queue Subscriptions","level":"7.6","depth":1,"path":"developer/streaming/queues.md","ref":"developer/streaming/queues.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/acks.md","mtime":"2019-05-30T22:52:52.236Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-08-13T14:26:56.704Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>

View File

@@ -2344,7 +2344,7 @@
<p>First, it is recommended to understand the relation between Streaming and core NATS. You should familiarize yourself with the <a href="../../nats_streaming/relation-to-nats.html">concept</a>.</p>
<p>NATS Streaming is a service on top of NATS. To connect to the service you first connect to NATS and then use the client library to communicate with the server over your NATS connection. Most of the libraries provide a convenience mechanism for connecting in a single step. These convenience methods will take some NATS options, like the cluster ID, and perform the NATS connection first, then run the protocol to connect to the streaming server.</p>
<p>Connecting to a streaming server requires a cluster id, defined by the server configuration, and a client ID defined by the client.</p>
<p><em>Client ID should contain only alphanumeric characters, <code>-</code> or `</em>`_</p>
<p><em>Client ID should contain only alphanumeric characters, <code>-</code> or <code>_</code></em></p>
<p>Connecting to a server running locally on the default port is as simple as this:</p>
<pre class="language-"><code class="lang-go">sc<span class="token punctuation">,</span> err <span class="token operator">:=</span> stan<span class="token punctuation">.</span><span class="token function">Connect</span><span class="token punctuation">(</span>clusterID<span class="token punctuation">,</span> clientID<span class="token punctuation">)</span>
</code></pre>
@@ -2397,7 +2397,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Connecting to NATS Streaming","level":"7.2","depth":1,"next":{"title":"Publishing to a Channel","level":"7.3","depth":1,"path":"developer/streaming/publishing.md","ref":"developer/streaming/publishing.md","articles":[]},"previous":{"title":"Introduction","level":"7.1","depth":1,"path":"developer/streaming/README.md","ref":"developer/streaming/README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/connecting.md","mtime":"2019-05-30T22:52:52.236Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-07-25T22:29:27.003Z"},"basePath":"../..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Connecting to NATS Streaming","level":"7.2","depth":1,"next":{"title":"Publishing to a Channel","level":"7.3","depth":1,"path":"developer/streaming/publishing.md","ref":"developer/streaming/publishing.md","articles":[]},"previous":{"title":"Introduction","level":"7.1","depth":1,"path":"developer/streaming/README.md","ref":"developer/streaming/README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/connecting.md","mtime":"2019-08-13T14:25:46.277Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-08-13T14:26:56.704Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>

View File

@@ -2390,7 +2390,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Durable Subscriptions","level":"7.5","depth":1,"next":{"title":"Queue Subscriptions","level":"7.6","depth":1,"path":"developer/streaming/queues.md","ref":"developer/streaming/queues.md","articles":[]},"previous":{"title":"Receiving Messages from a Channel","level":"7.4","depth":1,"path":"developer/streaming/receiving.md","ref":"developer/streaming/receiving.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/durables.md","mtime":"2019-05-30T22:52:52.236Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-07-25T22:29:27.003Z"},"basePath":"../..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Durable Subscriptions","level":"7.5","depth":1,"next":{"title":"Queue Subscriptions","level":"7.6","depth":1,"path":"developer/streaming/queues.md","ref":"developer/streaming/queues.md","articles":[]},"previous":{"title":"Receiving Messages from a Channel","level":"7.4","depth":1,"path":"developer/streaming/receiving.md","ref":"developer/streaming/receiving.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/durables.md","mtime":"2019-05-30T22:52:52.236Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-08-13T14:26:56.704Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>

View File

@@ -2457,7 +2457,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Embedding NATS Streaming Server","level":"8.7","depth":1,"next":{"title":"Docker Swarm","level":"8.8","depth":1,"path":"nats_streaming/swarm.md","ref":"nats_streaming/swarm.md","articles":[]},"previous":{"title":"Windows Service","level":"8.6","depth":1,"path":"nats_streaming/gettingstarted/windows-service.md","ref":"nats_streaming/gettingstarted/windows-service.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/embedding.md","mtime":"2019-06-07T16:08:27.720Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-07-25T22:29:27.003Z"},"basePath":"../..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Embedding NATS Streaming Server","level":"8.7","depth":1,"next":{"title":"Docker Swarm","level":"8.8","depth":1,"path":"nats_streaming/swarm.md","ref":"nats_streaming/swarm.md","articles":[]},"previous":{"title":"Windows Service","level":"8.6","depth":1,"path":"nats_streaming/gettingstarted/windows-service.md","ref":"nats_streaming/gettingstarted/windows-service.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/embedding.md","mtime":"2019-06-07T16:08:27.720Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-08-13T14:26:56.704Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>

View File

@@ -2486,7 +2486,7 @@ distributed system.</p>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Introduction","level":"7.1","depth":1,"next":{"title":"Connecting to NATS Streaming","level":"7.2","depth":1,"path":"developer/streaming/connecting.md","ref":"developer/streaming/connecting.md","articles":[]},"previous":{"title":"Partitioning","level":"6.8","depth":1,"path":"nats_streaming/partitioning.md","ref":"nats_streaming/partitioning.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/README.md","mtime":"2019-05-30T22:52:52.236Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-07-25T22:29:27.003Z"},"basePath":"../..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Introduction","level":"7.1","depth":1,"next":{"title":"Connecting to NATS Streaming","level":"7.2","depth":1,"path":"developer/streaming/connecting.md","ref":"developer/streaming/connecting.md","articles":[]},"previous":{"title":"Partitioning","level":"6.8","depth":1,"path":"nats_streaming/partitioning.md","ref":"nats_streaming/partitioning.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/README.md","mtime":"2019-05-30T22:52:52.236Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-08-13T14:26:56.704Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>

View File

@@ -2436,7 +2436,7 @@
<h5 id="description"><a name="description" class="plugin-anchor" href="#description"><i class="fa fa-link" aria-hidden="true"></i></a>Description</h5>
<p>A connection request is sent when a streaming client connects to the NATS Streaming Server. The connection request contains a unique identifier representing the client, and an inbox subject the client will listen on for incoming heartbeats. The identifier <strong>must</strong> be unique; a connection attempt with an identifier currently in use will fail. The inbox subject is the subject where the client receives incoming heartbeats, and responds by publishing an empty NATS message to the reply subject, indicating it is alive. The NATS Streaming Server will return a <a href="#connectresponse">ConnectResponse</a> message to the reply subject specified in the NATS request message.</p>
<p>More advanced libraries can set the protocol to 1 and send a connection ID which in combination with ping interval and ping max out allows the library to detect that the connection to the server is lost.</p>
<p>This request is published to a subject comprised of the <code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>discover-prefix</span><span class="token punctuation">&gt;</span></span>.cluster-id</code>, for example, if a NATS Streaming Server was started with a cluster-id of <code>mycluster</code>, and the default prefix was used, the client publishes to <code>_STAN.discover.mycluster</code></p>
<p>This request is published to a subject comprised of the <code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>discover-prefix</span><span class="token punctuation">&gt;</span></span>.cluster-id</code>. For example, if a NATS Streaming Server was started with a cluster-id of <code>mycluster</code>, and the default prefix was used, the client publishes to <code>_STAN.discover.mycluster</code></p>
<h5 id="message-structure"><a name="message-structure" class="plugin-anchor" href="#message-structure"><i class="fa fa-link" aria-hidden="true"></i></a>Message Structure</h5>
<ul>
<li><code>clientID</code>: A unique identifier for a client</li>
@@ -2627,7 +2627,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"The Streaming Protocol","level":"7.8","depth":1,"next":{"title":"Installing","level":"8.1","depth":1,"path":"nats_streaming/gettingstarted/install.md","ref":"nats_streaming/gettingstarted/install.md","articles":[]},"previous":{"title":"Acknowledgements","level":"7.7","depth":1,"path":"developer/streaming/acks.md","ref":"developer/streaming/acks.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/protocol.md","mtime":"2019-05-30T22:52:52.237Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-07-25T22:29:27.003Z"},"basePath":"../..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"The Streaming Protocol","level":"7.8","depth":1,"next":{"title":"Installing","level":"8.1","depth":1,"path":"nats_streaming/gettingstarted/install.md","ref":"nats_streaming/gettingstarted/install.md","articles":[]},"previous":{"title":"Acknowledgements","level":"7.7","depth":1,"path":"developer/streaming/acks.md","ref":"developer/streaming/acks.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/protocol.md","mtime":"2019-08-13T14:25:46.278Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-08-13T14:26:56.704Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>

View File

@@ -2395,7 +2395,7 @@ nuid<span class="token punctuation">,</span> err <span class="token operator">:=
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Publishing to a Channel","level":"7.3","depth":1,"next":{"title":"Receiving Messages from a Channel","level":"7.4","depth":1,"path":"developer/streaming/receiving.md","ref":"developer/streaming/receiving.md","articles":[]},"previous":{"title":"Connecting to NATS Streaming","level":"7.2","depth":1,"path":"developer/streaming/connecting.md","ref":"developer/streaming/connecting.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/publishing.md","mtime":"2019-05-30T22:52:52.237Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-07-25T22:29:27.003Z"},"basePath":"../..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Publishing to a Channel","level":"7.3","depth":1,"next":{"title":"Receiving Messages from a Channel","level":"7.4","depth":1,"path":"developer/streaming/receiving.md","ref":"developer/streaming/receiving.md","articles":[]},"previous":{"title":"Connecting to NATS Streaming","level":"7.2","depth":1,"path":"developer/streaming/connecting.md","ref":"developer/streaming/connecting.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/publishing.md","mtime":"2019-05-30T22:52:52.237Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-08-13T14:26:56.704Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>

View File

@@ -2410,7 +2410,7 @@ qsub2<span class="token punctuation">,</span> <span class="token boolean">_</spa
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Queue Subscriptions","level":"7.6","depth":1,"next":{"title":"Acknowledgements","level":"7.7","depth":1,"path":"developer/streaming/acks.md","ref":"developer/streaming/acks.md","articles":[]},"previous":{"title":"Durable Subscriptions","level":"7.5","depth":1,"path":"developer/streaming/durables.md","ref":"developer/streaming/durables.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/queues.md","mtime":"2019-06-25T14:14:34.660Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-07-25T22:29:27.003Z"},"basePath":"../..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Queue Subscriptions","level":"7.6","depth":1,"next":{"title":"Acknowledgements","level":"7.7","depth":1,"path":"developer/streaming/acks.md","ref":"developer/streaming/acks.md","articles":[]},"previous":{"title":"Durable Subscriptions","level":"7.5","depth":1,"path":"developer/streaming/durables.md","ref":"developer/streaming/durables.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/queues.md","mtime":"2019-06-25T14:14:34.660Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-08-13T14:26:56.704Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>

View File

@@ -2350,7 +2350,7 @@
<li>Queue/Durable</li>
</ul>
<p>For more details on the various types, check the <a href="../../nats_streaming/channels/subscriptions/subscriptions.html">concepts</a> section.</p>
<p><strong><em>Note: message callbacks are invoked serially, one message at a time. If your application does not care about processing ordering and would prefer the messages to be dispatched concurrently, it is the application responsibility to move them to some internal queue to be picked up by threads/go routines.</em></strong></p>
<p><strong><em>Note: message callbacks are invoked serially, one message at a time. If your application does not care about processing ordering and would prefer the messages to be dispatched concurrently, it is the application&apos;s responsibility to move them to some internal queue to be picked up by threads/go routines.</em></strong></p>
<p>Subscriptions set their starting position on creation using position or time. For example, in Go you can start at:</p>
<ul>
<li>The last message received</li>
@@ -2382,12 +2382,12 @@ sub<span class="token punctuation">,</span> err <span class="token operator">:=<
<span class="token keyword">func</span><span class="token punctuation">(</span>m <span class="token operator">*</span>stan<span class="token punctuation">.</span>Msg<span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token operator">...</span><span class="token punctuation">}</span><span class="token punctuation">,</span>
stan<span class="token punctuation">.</span><span class="token function">StartAtTime</span><span class="token punctuation">(</span>startTime<span class="token punctuation">)</span><span class="token punctuation">)</span>
</code></pre>
<p>To set the delay after which the server should attempt to redeliver a message for which it has not receive an acknowledgment:</p>
<p>To set the delay after which the server should attempt to redeliver a message for which it has not received an acknowledgment:</p>
<pre class="language-"><code class="lang-go">sub<span class="token punctuation">,</span> err <span class="token operator">:=</span> sc<span class="token punctuation">.</span><span class="token function">Subscribe</span><span class="token punctuation">(</span><span class="token string">&quot;foo&quot;</span><span class="token punctuation">,</span>
<span class="token keyword">func</span><span class="token punctuation">(</span>m <span class="token operator">*</span>stan<span class="token punctuation">.</span>Msg<span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token operator">...</span><span class="token punctuation">}</span><span class="token punctuation">,</span>
stan<span class="token punctuation">.</span><span class="token function">AckWait</span><span class="token punctuation">(</span><span class="token number">20</span><span class="token operator">*</span>time<span class="token punctuation">.</span>Second<span class="token punctuation">)</span><span class="token punctuation">)</span>
</code></pre>
<p>When an application wishes to stop receiving, but want to maintain the connection opened, the subscription should be closed. There are two ways to stop a subscription, either &quot;close&quot; it, or &quot;unsubscribe&quot; it. For non durable subscriptions, this is equivalent since the subscription will be completely removed. For durable subscriptions, close means that the server will stop delivering, but remember the durable subscription. Unsubscribe, however, means that the server will remove the state of this subscription.</p>
<p>When an application wishes to stop receiving, but wants to maintain the connection opened, the subscription should be closed. There are two ways to stop a subscription, either &quot;close&quot; it, or &quot;unsubscribe&quot; it. For non durable subscriptions, this is equivalent since the subscription will be completely removed. For durable subscriptions, close means that the server will stop delivering, but remember the durable subscription. Unsubscribe, however, means that the server will remove the state of this subscription.</p>
<p>To simply close:</p>
<pre class="language-"><code class="lang-go">err <span class="token operator">:=</span> sub<span class="token punctuation">.</span><span class="token function">Close</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
</code></pre>
@@ -2438,7 +2438,7 @@ sub<span class="token punctuation">,</span> err <span class="token operator">:=<
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Receiving Messages from a Channel","level":"7.4","depth":1,"next":{"title":"Durable Subscriptions","level":"7.5","depth":1,"path":"developer/streaming/durables.md","ref":"developer/streaming/durables.md","articles":[]},"previous":{"title":"Publishing to a Channel","level":"7.3","depth":1,"path":"developer/streaming/publishing.md","ref":"developer/streaming/publishing.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/receiving.md","mtime":"2019-05-30T22:52:52.237Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-07-25T22:29:27.003Z"},"basePath":"../..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Receiving Messages from a Channel","level":"7.4","depth":1,"next":{"title":"Durable Subscriptions","level":"7.5","depth":1,"path":"developer/streaming/durables.md","ref":"developer/streaming/durables.md","articles":[]},"previous":{"title":"Publishing to a Channel","level":"7.3","depth":1,"path":"developer/streaming/publishing.md","ref":"developer/streaming/publishing.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/streaming/receiving.md","mtime":"2019-08-13T14:25:46.278Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-08-13T14:26:56.704Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>