Reply-to topics for request-reply messaging through a WebSphere MQ link
WebSphere Application Server and WebSphere MQ JMS applications can publish messages to a topic space with a reply-to topic. Applications in the other network can receive the message, obtain the reply destination, and publish a message on the reply topic. Topic type replies cross the WebSphere MQ link through the publish/subscribe bridge.
Topic type replies are of two varieties:
- Permanent reply-to topics.
- Temporary topic replies.
Topic type reply-to destinations cannot be used with most WebSphere MQ applications. WebSphere MQ JMS applications handle them correctly, but MQI applications do not.
Permanent reply-to topics
For a reply message published to a permanent topic to cross between WebSphere Application Server and a WebSphere MQ network, the administrator must define an appropriate topic mapping for the reply topic on the publish/subscribe bridge for the WebSphere MQ link. The topic mapping defines the topic name and specifies whether 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.
For example, a WebSphere MQ JMS application is publishing messages on the topic "myTopic" in the WebSphere MQ network. The messages have a reply topic of "myReplyTopic". A WebSphere Application Server JMS application needs to receive the messages and publish replies to the reply topic. For this exchange of messages, specify two topic mappings on the publish/subscribe bridge:
- A topic mapping to make the publish/subscribe bridge subscribe to "myTopic" in the WebSphere MQ network. With this topic mapping, when the WebSphere MQ JMS application publishes messages to "myTopic", the messages are sent over the WebSphere MQ link, translated into the correct format, and delivered to the publish/subscribe bridge subscriber queue. There, they are processed and then sent on to the topic space as specified in the publish/subscribe topic mapping. The WebSphere Application Server JMS application receives the messages from the topic space.
- A topic mapping to make the publish/subscribe bridge forward messages published to "myReplyTopic" in WebSphere Application Server to the WebSphere MQ network. With this topic mapping, when the WAS JMS application publishes reply messages to "myReplyTopic" in WebSphere Application Server, the publish/subscribe bridge sends them to the WebSphere MQ network, where they are also published to "myReplyTopic".
Temporary topic replies
For a temporary topic reply message to cross between WebSphere Application Server and a WebSphere MQ network, we do not define a separate topic mapping. A temporary topic name is assigned at runtime, and the reply message is automatically routed between WebSphere Application Server and a WebSphere MQ network by the publish/subscribe bridge.
However, for temporary topic reply messages to be routed from the service integration bus back to WebSphere MQ through the publish/subscribe bridge, configure the broker stream queue of the topic mapping on which the request message is sent. The broker stream queue is the queue where the messages are published. This field will already be specified for bi-directional topic mappings. Although this field is not mandatory for "From MQ" topic mappings, it must be completed if we want temporary topic reply messages to be routed.
Temporary topic replies are only supported to publication messages. Point-to-point request messages with temporary topic reply destinations are not supported.