From 040ac69acdab5a151b8fa18c112f3b887ca57aae Mon Sep 17 00:00:00 2001 From: Ginger Collison Date: Fri, 14 Jun 2019 11:39:28 -0500 Subject: [PATCH] Update nats-protocol.md --- nats_protocol/nats-protocol.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nats_protocol/nats-protocol.md b/nats_protocol/nats-protocol.md index 08a2ccb..761918b 100644 --- a/nats_protocol/nats-protocol.md +++ b/nats_protocol/nats-protocol.md @@ -14,12 +14,14 @@ The NATS server implements a [zero allocation byte parser](https://youtu.be/ylRK **Newlines**: NATS uses `CR` followed by `LF` (`CR+LF`, `\r\n`, `0x0D0A`) to terminate protocol messages. This newline sequence is also used to mark the end of the message payload in a `PUB` or `MSG` protocol message. -**Subject names**: Subject names, including reply subject (INBOX) names, are case-sensitive and must be non-empty alphanumeric strings with no embedded whitespace, and optionally token-delimited using the dot character (`.`), e.g.: +**Subject names**: Subject names, including reply subject (INBOX) names, are case-sensitive and must be non-empty alphanumeric strings with no embedded whitespace. All ascii alphanumeric characters except spaces/tabs and separators which are "." and ">" are allowed. Subject names can be optionally token-delimited using the dot character (`.`), e.g.: `FOO`, `BAR`, `foo.bar`, `foo.BAR`, `FOO.BAR` and `FOO.BAR.BAZ` are all valid subject names `FOO. BAR`, `foo. .bar` and`foo..bar` are *not* valid subject names +A subject is comprised of 1 or more tokens. Tokens are separated by "." and can be any non space ascii alphanumeric character. The full wildcard token ">" is only valid as the last token and matches all tokens past that point. A token wildcard, "*" matches any token in the position it was listed. Wildcard tokens should only be used in a wildcard capacity and not part of a literal token. + **Character Encoding**: Subject names should be ascii characters for maximum interoperability. Due to language constraints and performance, some clients may support UTF-8 subject names, as may the server. No guarantees of non-ASCII support are provided. **Wildcards**: NATS supports the use of wildcards in subject subscriptions.