WebSphere Message Service Clients for C/C++ and .NET, Version 1.2 Operating Systems: Linux, Windows

Topic uniform resource identifiers (URIs)

The topic uniform resource identifier (URI) for a topic specifies the name of the topic, and, optionally, one or more properties of the topic.

The URI for a topic begins with the sequence topic://, followed by the name of the topic and, optionally, 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 schemes are:

WebSphere MQ queue manager with broker v1

The wildcard scheme for WebSphere MQ queue manager with broker v1 uses the following wildcard characters:

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

Table 1. Example URIs using wildcard scheme for WebSphere MQ queue manager with broker v1
URI Matches
"topic://Sport*Results" All topics starting with "Sport" and ending in "Results" such as "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" such as "topic://SportsResults" and "topic://SportXResults"
"topic://Sport/*ball*/Div?/Results/*/???" Topics such as "topic://Sport/Football/Div1/Results/2002/Nov" and "topic://Sport/Netball/National/Div3/Results/02/Jan"

WebSphere MQ with, or real-time connection to, a broker v2

The wildcard scheme for WebSphere MQ 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.

Table 2. Example URIs using wildcard scheme for WebSphere MQ with, or real-time connection to, a broker v2
URI Matches
"topic://Sport/+/Results" All topics with a single hierarchical level name between Sport and Results, such as "topic://Sport/Football/Results" and "topic://Sport/Ju-Jitsu/Results"
"topic://Sport/#/Results" All topics starting with "Sport/" and ending in "/Results" such as "topic://Sport/Football/Results" and "topic://Sport/Hockey/National/Div3/Results"
"topic://Sport/Football/#" All topics starting with "Sport/Football/" such as "topic://Sport/Football/Results" and "topic://Sport/Football/TeamNews/Signings/Managerial"

WebSphere service integration bus

The wildcard scheme for 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
URI Matches
"topic://Sport/*ball/Results" All topics with a single hierarchical level name ending in "ball" between Sport and Results, such as "topic://Sport/Football/Results" and "topic://Sport/Netball/Results"
"topic://Sport//Results" All topics starting with "Sport/" and ending in "/Results" such as "topic://Sport/Football/Results" and "topic://Sport/Hockey/National/Div3/Results"
"topic://Sport/Football//." All topics starting with "Sport/Football/" such as "topic://Sport/Football/Results" and "topic://Sport/Football/TeamNews/Signings/Managerial"
"topic://Sport/*ball//Results//." Topics such as "topic://Sport/Football/Results" and "topic://Sport/Netball/National/Div3/Results/2002/November"
Related concepts
Queue uniform resource identifiers (URIs)
Temporary destinations
Related reference
Destination (for the C class)
Destination (for the C++ class)
IDestination (for the .NET interface)
Properties of Destination

Concept topic

Terms of Use | Rate this page

Last updated: 7 Dec 2005

© Copyright IBM Corporation 2005. All Rights Reserved.