Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 8 Advanced Features : Subject Names

Subject Names
Each TIBCO Adapter SDK message bears a subject name.
Data-producing programs generate new data messages, label them with subject names, and send them using TIBCO Adapter SDK software. Data consumers receive data by listening to subject names. A consumer listening to a name receives all data labeled with a matching name, from the time it begins to listen until it stops listening.
Subject Name Syntax
Subject-based addressing™ technology places few restrictions on the syntax and interpretation of subject names. System designers and developers have the freedom (and responsibility) to establish conventions for using subject names. The best subject names reflect the structure of data in the application itself.
Each subject name is a string of characters that is divided into elements by the dot (.) character. It is invalid to incorporate the dot character into an element by using an escape sequence.
TIBCO Adapter SDK limits subject names to a total length of 255 characters (including dot separators). The maximum element length is 252 characters (dot separators are not included in element length). Typical subject names are shorter and use fewer elements. To maximize speed and throughput rates, use short subject names.
The following are examples of correct subject names:
The following are examples of incorrect subject names:
WRONG. (null element)
.TRIPLE.WRONG.. (three null elements)
Table 35 lists special characters in subject names.
It is illegal for application programs to send to subjects with underscore as the first character of the first element, except _INBOX and _LOCAL.
 
Using Wildcards to Receive Related Subjects
Programs can listen for wildcard subject names to access a collection of related data through a single subscription.
The asterisk (*) is a wildcard character that matches any one element. The asterisk substitutes for whole elements only, not for partial substrings of characters within an element.
Greater-than (>) is a wildcard character that matches all the elements remaining to the right.
A listener for a wildcard subject name receives any message whose subject name matches the wildcard.
The examples in Table 36 illustrate wildcard syntax and matching semantics.
Listening to this wildcard name
Matches messages with names like these:
RUN.Run.run (extra element)
Run.away (case)
RUN (missing element)
Yankees.beat.Sox (vs≠beat)
Yankees.vs (missing element)
your (missing elements)
HOME.RUN (position)
Run.away (case)
RUN (missing element)
Table 37 shows subject names that use invalid wildcards.
Asterisk (*) must take the place of one whole element, not a substring within a element.
Greater-than (>) can only appear as the right-most character. TIBCO Adapter SDK software interprets this as a specific subject name.
 
Although transports do not prevent you from sending to wildcard subjects, doing so can trigger unexpected behavior in other programs that share the network.
Distinguished Subject Names
Names that begin with an underscore character (_) are called distinguished subject names. Distinguished names indicate special meaning, special handling, or restricted use.
For example, a program listening to the subject _LOCAL.A.B.C receives all messages sent on subject _LOCAL.A.B.C from any transport connected to the same daemon. A TIBCO Adapter SDK daemon does not transmit messages with _LOCAL subjects beyond that daemon.
Subject names with this prefix indicate advisory messages, including informational messages, warnings and errors. Programs must not send to subjects with this prefix.
Subject names with this prefix indicate internal administrative messages associated with certified message delivery. Programs must not send to subjects with this prefix.
Subject names with this prefix indicate internal administrative messages associated with distributed certified delivery transports. Programs must not send to subjects with this prefix.
Subject names with this prefix indicate internal administrative messages associated with TIBCO Adapter SDK fault tolerance software. Programs must not send to subjects with this prefix.
Subject names with this prefix indicate protocol messages associated with TIBCO Adapter SDK DataSecurity software (sold separately). Programs must not send to subjects with this prefix.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved