-
Notifications
You must be signed in to change notification settings - Fork 20
Appendix
yangboz edited this page Nov 22, 2012
·
3 revisions
The forward slash (/) is used to separate each level within a topic tree and provide a hierarchical structure to the topic space. The use of the topic level separator is significant when the two wildcard characters are encountered in topics specified by subscribers.
The number sign (#) is a wildcard character that matches any number of levels within a topic.
The plus sign (+) is a wildcard character that matches only one topic level.
When you build an application, the design of the topic tree should take into account the following principles of topic name syntax and semantics:
- A topic must be at least one character long.
- Topic names are case sensitive. For example, ACCOUNTS and Accounts are two different topics.
- Topic names can include the space character. For example, Accounts payable is a valid topic.
- A leading "/" creates a distinct topic. For example, /finance is different from finance. /finance matches "+/+" and "/+", but not "+".
- Do not include the null character (Unicode \x0000) in any topic.
The following principles apply to the construction and content of a topic tree:
- The length is limited to 64k but within that there are no limits to the number of levels in a topic tree.
- There can be any number of root nodes; that is, there can be any number of topic trees.