Destination Name Syntax
FTL places few restrictions on the syntax and interpretation of destination names. System designers and developers have the freedom to establish their own conventions when creating destination names. The best destination names reflect the structure of the data in the application itself.
Structure
A destination name is a string divided into elements, each element separated by the dot character (.). The dot character allows you to create multi-part destination names that categorize destinations.
Empty strings ("") are not permitted in destination names. Elements cannot incorporate the dot character by using an escape sequence.
Prefixes in the first element denote special destinations. If a prefix is used, the prefix cannot be the entirety of the first element (the first element must contain one or more characters following the prefix).
-
Destinations where the first element begins with “Q:” are queue destinations.
-
Destinations where the first element begins with “M:” are map destinations.
-
Destinations where the first element begins with an underscore (_) are reserved by FTL. You may not configure reserved destinations or use them in client programs.
-
All other destinations are topic destinations.
Although they are not prohibited, we recommend that you do not use tabs, spaces, or any unprintable character in a destination name.
You may use wildcards when configuring destinations. You may not use wildcards in client programs. Wildcards may only be the last element of a destination. See Destination Matching and Wildcards for more information.
Length
Destinations are limited to a total length of 249 characters.
A destination can have up to 64 elements. Each element cannot exceed 127 characters. Dot separators are not included in element length.
Destination Name Performance Considerations
When designing destination naming conventions, remember these performance considerations:
-
Shorter destination names perform better than long destination names.
-
Destinations with several short elements perform better than one long element.
-
A set of destinations that differ early in their element lists perform better than subjects that differ only in the last element.
Special Sequences in Destination Names
These characters or sequences of characters have special meanings when used in destination names:
Sequence | Name | Special Meaning |
---|---|---|
. | Dot | Separates elements within a destination name. |
> | Greater-than | Wildcard character, matches one or more trailing elements. |
* | Asterisk | Wildcard character, matches exactly one trailing element. |
_ | Underscore | When prefixed to the first element, denotes a destination reserved by FTL. May not be used in configuration or applications. |
Q: | Queue prefix | When prefixed to the first element, denotes a queue destination. |
M: | Map prefix | When prefixed to the first element, denotes a map destination. |
For more information on wildcard matching, see Destination Matching and Wildcards.
Examples of Destination Names
These examples illustrate the syntax for destination names.
Valid examples:
-
NEWS.LOCAL.POLITICS.CITY_COUNCIL
-
NEWS.NATIONAL.ARTS.MOVIES.REVIEWS
-
CHAT.MRKTG.NEW_PRODUCTS
-
CHAT.DEVELOPMENT.BIG_PROJECT.DESIGN
-
News.Sports.Baseball
-
finance
-
This.long.subject_name.is.valid.even.though.quite.uninformative
-
abc.>
-
abc.*
-
>
-
*
-
Q:abc
-
Q:abc.>
-
Q:>
-
M:123.456
-
M:123.*
-
M:*
Invalid examples:
-
News..Natural_Disasters.Flood
(null element) -
WRONG.
(null element) -
.TRIPLE.WRONG..
(three null elements) -
News.Tennis.Stats.Roger\.Federer
(backslash in the element Roger will be included in the element name, and will not escape the dot) -
Q:
(queue/map prefix cannot be the entire first element) -
M:.abc
(queue/map prefix cannot be the entire first element) -
_News
(leading underscore is reserved by FTL) -
A.*.B
(wildcards must be the last element) -
>.B
(wildcards must be the last element)