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

Update subjects.md

This commit is contained in:
Ginger Collison 2019-10-04 12:05:30 -05:00 committed by GitHub
parent bdf8ce0647
commit 8b7ba5c3bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,13 +26,13 @@ NATS provides two _wildcards_ that can take the place of one or more elements in
The first wildcard is `*` which will match a single token. For example, if an application wanted to listen for eastern time zones, they could subscribe to `time.*.east`, which would match `time.us.east` and `time.eu.east`. The first wildcard is `*` which will match a single token. For example, if an application wanted to listen for eastern time zones, they could subscribe to `time.*.east`, which would match `time.us.east` and `time.eu.east`.
![subjects 2](/assets/images/subjects2.svg) ![](/assets/images/subjects2.svg)
### Matching Multiple Tokens ### Matching Multiple Tokens
The second wildcard is `>` which will match one or more tokens, and can only appear at the end of the subject. For example, `time.us.>` will match `time.us.east` and `time.us.east.atlanta`, while `time.us.*` would only match `time.us.east` since it can't match more than one token. The second wildcard is `>` which will match one or more tokens, and can only appear at the end of the subject. For example, `time.us.>` will match `time.us.east` and `time.us.east.atlanta`, while `time.us.*` would only match `time.us.east` since it can't match more than one token.
![subjects 3](/assets/images/subjects3.svg) ![](/assets/images/subjects3.svg)
### Monitoring and Wire Taps ### Monitoring and Wire Taps