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-06-11 15:10:16 -05:00
parent bccaa4128f
commit 99ca005ae7
154 changed files with 883 additions and 189 deletions

View File

@@ -2367,7 +2367,7 @@
</code></pre>
<h3 id="3-run-the-go-client-subscriber-with-queue-group-name"><a name="3-run-the-go-client-subscriber-with-queue-group-name" class="plugin-anchor" href="#3-run-the-go-client-subscriber-with-queue-group-name"><i class="fa fa-link" aria-hidden="true"></i></a>3. Run the Go client subscriber with queue group name</h3>
<pre class="language-"><code class="lang-sh"><span class="token function">cd</span> <span class="token variable">$GOPATH</span>/src/github.com/nats-io/nats.go/examples
go run nats-qsub.go foo my-queue
go run nats-qsub/main.go foo my-queue
</code></pre>
<h3 id="4-install-and-run-the-node-client-subscriber-with-queue-group-name"><a name="4-install-and-run-the-node-client-subscriber-with-queue-group-name" class="plugin-anchor" href="#4-install-and-run-the-node-client-subscriber-with-queue-group-name"><i class="fa fa-link" aria-hidden="true"></i></a>4. Install and run the Node client subscriber with queue group name</h3>
<pre class="language-"><code class="lang-sh"><span class="token function">npm</span> <span class="token function">install</span> nats
@@ -2380,17 +2380,17 @@ nats-queue foo my-queue <span class="token operator">&amp;</span>
</code></pre>
<h3 id="6-run-another-go-client-subscriber-without-the-queue-group"><a name="6-run-another-go-client-subscriber-without-the-queue-group" class="plugin-anchor" href="#6-run-another-go-client-subscriber-without-the-queue-group"><i class="fa fa-link" aria-hidden="true"></i></a>6. Run another Go client subscriber <em>without</em> the queue group.</h3>
<pre class="language-"><code class="lang-sh"><span class="token function">cd</span> <span class="token variable">$GOPATH</span>/src/github.com/nats-io/nats.go/examples
go run nats-sub.go foo
go run nats-sub/main.go foo
</code></pre>
<h3 id="7-publish-a-nats-message-using-the-go-client"><a name="7-publish-a-nats-message-using-the-go-client" class="plugin-anchor" href="#7-publish-a-nats-message-using-the-go-client"><i class="fa fa-link" aria-hidden="true"></i></a>7. Publish a NATS message using the Go client</h3>
<pre class="language-"><code class="lang-sh"><span class="token function">cd</span> <span class="token variable">$GOPATH</span>/src/github.com/nats-io/nats.go/examples
go run nats-pub.go foo <span class="token string">&quot;Hello NATS!&quot;</span>
go run nats-pub/main.go foo <span class="token string">&quot;Hello NATS!&quot;</span>
</code></pre>
<h3 id="8-verify-message-publication-and-receipt"><a name="8-verify-message-publication-and-receipt" class="plugin-anchor" href="#8-verify-message-publication-and-receipt"><i class="fa fa-link" aria-hidden="true"></i></a>8. Verify message publication and receipt</h3>
<p>You should see that the publisher sends the message: <em>Published [foo] : &apos;Hello NATS!&apos;</em></p>
<p>You should see that only one of the my-queue group subscribers receives the message. In addition, the Go client subscriber not in the my-queue group should also receive the message.</p>
<h3 id="9-publish-another-message"><a name="9-publish-another-message" class="plugin-anchor" href="#9-publish-another-message"><i class="fa fa-link" aria-hidden="true"></i></a>9. Publish another message</h3>
<pre class="language-"><code class="lang-sh">go run nats-pub.go foo <span class="token string">&quot;Hello NATS Again!&quot;</span>
<pre class="language-"><code class="lang-sh">go run nats-pub/main.go foo <span class="token string">&quot;Hello NATS Again!&quot;</span>
</code></pre>
<p>You should see that a different queue group subscriber receives the message this time, chosen at random among the 3 queue group members.</p>
@@ -2436,7 +2436,7 @@ go run nats-pub.go foo <span class="token string">&quot;Hello NATS!&quot;</span>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Explore NATS Queueing","level":"3.8.3","depth":2,"next":{"title":"Advanced Connect and Custom Dialer in Go","level":"3.8.4","depth":2,"path":"developer/tutorials/custom_dialer.md","ref":"developer/tutorials/custom_dialer.md","articles":[]},"previous":{"title":"Explore NATS Request/Reply","level":"3.8.2","depth":2,"path":"developer/tutorials/reqreply.md","ref":"developer/tutorials/reqreply.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors"],"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"}},"include-html":{},"toggle-chapters":{},"anchors":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"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}},"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/tutorials/queues.md","mtime":"2019-06-05T22:32:07.013Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-06-07T18:14:40.088Z"},"basePath":"../..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Explore NATS Queueing","level":"3.8.3","depth":2,"next":{"title":"Advanced Connect and Custom Dialer in Go","level":"3.8.4","depth":2,"path":"developer/tutorials/custom_dialer.md","ref":"developer/tutorials/custom_dialer.md","articles":[]},"previous":{"title":"Explore NATS Request/Reply","level":"3.8.2","depth":2,"path":"developer/tutorials/reqreply.md","ref":"developer/tutorials/reqreply.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/tutorials/queues.md","mtime":"2019-06-11T19:34:10.865Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-06-11T20:09:10.268Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>
@@ -2868,6 +2868,10 @@ go run nats-pub.go foo <span class="token string">&quot;Hello NATS!&quot;</span>
<script src="../../gitbook/gitbook-plugin-edit-link/plugin.js"></script>
<script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>