The wildcard characters recognized by WebSphere MQ Publish/Subscribe are:
In the example shown in Figure 1, the high-level topic of 'Sport' might be divided into separate topics covering different sports, such as:
Sport/Soccer Sport/Golf Sport/Tennis
These might be divided further, to separate different types of information about each sport, such as:
Sport/Soccer/Fixtures Sport/Soccer/Results Sport/Soccer/Reports
The following topic strings could be used in subscriptions to retrieve particular sets of information:
Note that wildcards do not span streams (see Streams).
The percent character '%' is used as an escape character, to allow these characters to be used in a topic string. For example, the string 'ABC%*D' represents the actual topic ABC*D. If the string ABC%*D is specified in a Publish message (where wildcard characters are not allowed), the string could be matched by a subscriber specifying the string ABC?D.
To use a % character in a topic string, specify two percent characters '%%'. A percent character in a string must always be followed by a '*', a '?', or another '%' character.
If wildcard characters are not allowed in a message, a '*' or '?' character can be present only if it is immediately preceded by a '%' character so that the '*' or '?' character loses its wildcard semantics. Therefore, ABC%*D is a valid topic string in a Publish message but ABC*D is not.
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
amqnar1011 |