Topic mapping on a WebSphere MQ link
A topic mapping is an association that defines which messages published in WebSphere Application Server or the WebSphere MQ network, should be forwarded to the other publish/subscribe system.
We define one or more topic mappings for a broker profile. The broker profile defines the connection between WebSphere Application Server and a WebSphere MQ queue manager or separate publish/subscribe broker. The topic mapping links a specific topic in the WAS service integration bus with its equivalent in the WebSphere MQ network.
When you define a topic mapping, you choose if messages are to flow from WebSphere MQ to WebSphere Application Server, or from WebSphere Application Server to WebSphere MQ, or if the flow is two-way, or bidirectional. If a topic mapping is bidirectional, a message is safeguarded from being continually republished on alternating sides of the publish/subscribe bridge.
In the topic mapping, the topic name and its position in the hierarchy (or tree) of topics must be the same in WebSphere Application Server and in the WebSphere MQ network. We can use wild cards, as described in Wild cards in topic mapping. For example, if you set up a topic mapping for "stock/IBM" with a direction from the WAS service integration bus to WebSphere MQ, the publish/subscribe bridge subscribes to the topic "stock/IBM" in WebSphere Application Server, and receives the messages published to the topic. The publish/subscribe bridge then publishes the messages to the topic "stock/IBM" in the WebSphere MQ network.
Messages published by a service integration JMS client are transferred to a WebSphere MQ network if an appropriate topic mapping has been created. This is presented to the WebSphere MQ network as only the topic name, for example, "sports/football". A suitably configured WebSphere MQ JMS application can use this information to publish further information to the same topic, but the original WebSphere Application Server JMS application receives these messages only if appropriate topic mapping has been configured.
If we delete a WebSphere MQ link, first unsubscribe and delete the topic mappings, to ensure there are no outstanding subscriptions in WebSphere Application Server or the WebSphere MQ network. For the process to unsubscribe, see Preparing to remove a foreign bus connection between a service integration bus and a WebSphere MQ network.
Subtopics
- Wild cards in topic mapping
Wild cards can be used in topic mapping on a WebSphere MQ link for publish/subscribe messaging, but there are differences between wild cards in WebSphere Application Server service integration, and wild cards in a WebSphere MQ network.
Related tasks
Add topic mappings on the WebSphere MQ link publish/subscribe broker Preparing to remove a foreign bus connection between a service integration bus and a WebSphere MQ network