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

Merge pull request #33 from tetsushiomi/patch-1

Update queues.md
This commit is contained in:
Ginger Collison 2020-01-07 09:33:45 -06:00 committed by GitHub
commit 6f7890786d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@ wg := sync.WaitGroup{}
wg.Add(10) wg.Add(10)
// Create a queue subscription on "updates" with queue name "workers" // Create a queue subscription on "updates" with queue name "workers"
if _, err := nc.QueueSubscribe("updates", "worker", func(m *nats.Msg) { if _, err := nc.QueueSubscribe("updates", "workers", func(m *nats.Msg) {
wg.Done() wg.Done()
}); err != nil { }); err != nil {
log.Fatal(err) log.Fatal(err)
@ -139,7 +139,7 @@ The full wildcard can also be used, for example the following would prevent plai
allow = ["bar >"] allow = ["bar >"]
``` ```
Permissions for Queue Subscriptions can be combined with plain subscriptions as well though, for example you could allow plain subscriptions on `foo` but constrain the queues to which a client can join, as well a preventing any service from using a queue subscription with the name `*.prod`: Permissions for Queue Subscriptions can be combined with plain subscriptions as well though, for example you could allow plain subscriptions on `foo` but constrain the queues to which a client can join, as well as preventing any service from using a queue subscription with the name `*.prod`:
```text ```text
users = [ users = [