Messaging between two IBM MQ networks through an application server
Use IBM MQ links to send a message from one IBM MQ network to another through a WebSphere Application Server application server.
We can exchange messages between two IBM MQ networks through an intermediate service integration bus, as shown in the following figure.
Figure 1. Exchanging messages between two IBM MQ networks through an intermediate application server.
Configuration and operation of messaging between two IBM MQ networks (buses) through an intermediate service integration bus is much simpler if we choose a service integration bus name that complies with IBM MQ queue manager naming restrictions:
- The queue managers in the IBM MQ networks "see" the intermediate service integration bus as a queue manager, and refer to it by the virtual queue manager name. Provided that the service integration bus name complies with IBM MQ restrictions for queue manager names, it is possible (and highly desirable) for the virtual queue manager name used by both IBM MQ networks to be the same as the bus name used by service integration.
- The service integration bus includes two gateway messaging engines, one connecting to each of the IBM MQ networks using IBM MQ links (known to the IBM MQ gateway queue managers as an IBM MQ sender-receiver pair of message channels). The service integration bus must define the two IBM MQ networks as foreign buses with names the same as the IBM MQ names for the gateway queue managers.
Messages received by the service integration bus from one IBM MQ network and destined for another IBM MQ network specify both the target queue name and the target queue manager name. Service integration interprets the target queue manager name as a bus name. When the target queue manager is the gateway queue manager for the target IBM MQ network, service integration routes the message correctly. When the target queue manager is not the gateway queue manager for the target IBM MQ network, there are two options:
- In service integration, define the target queue manager as an indirect foreign bus, connected by the IBM MQ foreign bus defined with the name of the gateway queue manager.
- In service integration, define the target queue (destination name or identifier in service integration terminology) and queue manager (bus name in service integration terminology) combination with an alias destination that maps the combination to the target IBM MQ network (foreign bus in service integration terminology) with the destination name (identifier) in the form target-queue-name@target-queue-manager-name.
Messages received by the service integration bus from one IBM MQ network and destined for another IBM MQ network can include a reply-to queue. This is specified as the reply-to queue name and the reply-to queue manager name. When the service integration bus receives the message, the IBM MQ link replaces this reply-to information with a service integration bus destination comprising a bus name (which is the IBM MQ queue manager name of the gateway queue manager) and a destination name (identifier) of the form reply-to-queue-name@reply-to-queue-manager-name. This new reply-to information travels with the message to the receiving IBM MQ application. The combined length of the reply-to queue name, the "@" character, and the reply-to queue manager name must be less than or equal to the IBM MQ maximum queue name length of 48 characters.