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.
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 option is available:
- WebSphere® Application Server service integration bus
WebSphere Application Server service integration bus
WebSphere Application Server service integration bus uses the following wildcard characters:
- * to match any characters at one level in the hierarchy
- // to match 0 or more levels
- //. to match 0 or more levels (at the end of a Topic expression)
| 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" |