Topics

A topic identifies what a publication is about. A topic is a character string that describes the subject of the information that is published in a Publish/Subscribe message. As a subscriber, you can specify a topic or range of topics by using wildcards to receive the information that you require.

A topic identifies what a publication is about and consists of a character string that can be up to 10,240 character long. Topics are key to the successful delivery of messages in a Publish/Subscribe system. Instead of including a specific destination address in each message, a publisher assigns a topic to each message. The queue manager matches the topic with a list of subscribers who subscribe to that topic, and delivers the message to each of those subscribers.

A publisher can control which subscribers receive a publication by choosing carefully the topic that is specified in the message.

The topic of a message does not have to be defined before a publisher can use it; a topic is created when it is specified in a publication or subscription for the first time.

For the latest about topic strings, wildcard characters, special characters, and topic trees, refer to the following information:

Wildcards and special characters in topic strings

This topic details the wildcards that are used in the IBM® WebSphere® MQ Version 7.0 or later implementation of Publish/Subscribe messaging.

A topic can contain any character in the Unicode character set. However, the following three characters have a special meaning in the Version 7.0 or later Publish/Subscribe:
  • The topic level separator "/".
  • The multilevel wildcard "#".
  • The single-level wildcard "+".

The topic level separator is used to introduce structure into the topic, and can therefore be specified within the topic for that purpose.

Wildcards are a powerful feature of the topic system in IBM MQ Publish/Subscribe. Wildcards allow subscribers to subscribe to more than one topic at a time. The multilevel wildcard and single level wildcard can be used for subscriptions, but they cannot be used within a topic by the publisher of a message.

However, if a publisher uses the characters "+" or "#" together with other characters in any topic level within a topic, these characters are not treated as wildcards, and they do not have any special meaning.


Concept Concept

Feedback

Timestamp icon Last updated: Wednesday, 14 February 2018
http://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm.mq.explorer.doc/com.ibm.mq.explorer.doc/e_topics.htm