WebSphere Message Service Client for C/C++, Version 2.0.2 Operating Systems: AIX, Linux, Solaris, Windows

Topic uniform resource identifiers

The topic uniform resource identifier (URI) specifies the name of the topic; it can also specify one or more properties for it.

The URI for a topic begins with the sequence topic://, followed by the name of the topic and (optional) a list of name-value pairs that set the remaining topic properties. A topic name cannot be empty.

Here is an example in a fragment of C++ code:
topic = session.createTopic("topic://Sport/Football/Results?multicast=7");

For more information about the properties of a topic, including the name and valid values that you can use in a URI, see Properties of Destination.

When specifying a topic URI for use in a subscription, wildcards can be used. The syntax for these wildcards depends on the connection type and broker version; the following options are available:

WebSphere MQ V7.0 queue manager with Character level wildcard format

WebSphere MQ V7.0 queue manager with Character level wildcard format uses the following wild card characters:

Table 1 gives some examples of how to use this wildcard scheme.

Table 1. Example URIs using character level wildcard scheme for WebSphere MQ V7.0 queue manager
Uniform Resource Identifier Matches Examples
"topic://Sport*Results" All topics starting with "Sport" and ending in "Results" "topic://SportsResults" and "topic://Sport/Hockey/National/Div3/Results"
"topic://Sport?Results" All topics starting with "Sport" followed by a single character, followed by "Results" "topic://SportsResults" and "topic://SportXResults"
"topic://Sport/*ball*/Div?/Results/*/???" Topics "topic://Sport/Football/Div1/Results/2002/Nov" and "topic://Sport/Netball/National/Div3/Results/02/Jan"

WebSphere MQ V7.0 queue manager with Topic level wild card format

WebSphere MQ V7.0 queue manager with Topic level wild card format uses the following wildcard characters:
  • # to match multiple levels
  • + to match a single level
Table 2 gives some examples of how to use this wildcard scheme.
Table 2. Example URIs using topic level wildcard scheme for WebSphere MQ V7.0 queue manager
Uniform Resource Identifier Matches Examples
"topic://Sport/+/Results" All topics with a single hierarchical level name between Sport and Results "topic://Sport/Football/Results" and "topic://Sport/Ju-Jitsu/Results"
"topic://Sport/#/Results" All topics starting with "Sport/" and ending in "/Results" "topic://Sport/Football/Results" and "topic://Sport/Hockey/National/Div3/Results"
"topic://Sport/Football/#" All topics starting with "Sport/Football/" "topic://Sport/Football/Results" and "topic://Sport/Football/TeamNews/Signings/Managerial"

WebSphere MQ V6.0 queue manager with broker V1

WebSphere MQ V6.0 queue manager with broker V1 uses the following wildcard characters:

Table 1 gives some examples of how to use this wildcard scheme.

WebSphere MQ V6.0 with, or real-time connection to, a broker V2

WebSphere MQ V6.0 with, or real-time connection to, a broker V2 uses the following wildcard characters:

Table 2 gives some examples of how to use this wildcard scheme.

WebSphere service integration bus

WebSphere MQ with, or real-time connection to, a broker V2 uses the following wildcard characters:

Table 3 gives some examples of how to use this wildcard scheme.

Table 3. Example URIs using wildcard scheme for WebSphere service integration bus
Uniform Resource Identifier Matches Examples
"topic://Sport/*ball/Results" All topics with a single hierarchical level name ending in "ball" between Sport and Results "topic://Sport/Football/Results" and "topic://Sport/Netball/Results"
"topic://Sport//Results" All topics starting with "Sport/" and ending in "/Results" "topic://Sport/Football/Results" and "topic://Sport/Hockey/National/Div3/Results"
"topic://Sport/Football//." All topics starting with "Sport/Football/" "topic://Sport/Football/Results" and "topic://Sport/Football/TeamNews/Signings/Managerial"
"topic://Sport/*ball//Results//." Topics "topic://Sport/Football/Results" and "topic://Sport/Netball/National/Div3/Results/2002/November"

Concept topic

Terms of Use | Rate this page

Last updated: 24 May 2011

(C) Copyright IBM Corporation 2005, 2011. All Rights Reserved.