Message flow control is a task that involves the setting up and maintenance of message routes between queue managers. This is very important for routes that multi-hop through many queue managers.
You control message flow using a number of techniques that were introduced in Chapter 2, Making your applications communicate. If your queue manager is in a cluster, message flow is controlled using different techniques, as described in the WebSphere MQ Queue Manager Clusters book. If your queue managers are in a queue sharing group and intra-group queuing (IGQ) is enabled, then the message flow can be controlled by IGQ agents, which are described in Chapter 37, Intra-group queuing .
This chapter describes how you use your system's queues, alias queue definitions, and message channels to achieve message flow control.
You make use of the following objects:
The queue manager and queue objects are described in the WebSphere MQ System Administration Guide book for WebSphere MQ for AIX, HP-UX, Linux, Solaris, and Windows systems, and MQSeries V5.1 for Compaq Tru64 UNIX, and OS/2 Warp, in the WebSphere MQ for iSeries V5.3 System Administration book for WebSphere MQ for iSeries, in the WebSphere MQ for z/OS Concepts and Planning Guide for WebSphere MQ for z/OS, or in the MQSeries System Management Guide for your platform. Message channels are described in Message channels. The following techniques use these objects to create message flows in your system:
Note |
---|
All the concepts described in this chapter are relevant for all nodes in a network, and include sending and receiving ends of message channels. For this reason, only one node is illustrated in most examples, except where the example requires explicit cooperation by the administrator at the other end of a message channel. |
Before proceeding to the individual techniques it is useful to recap on the concepts of name resolution and the three ways of using remote queue definitions. See Chapter 3, More about intercommunication.
The queue name used by the application, the logical queue name, is resolved by the queue manager to the destination queue name, that is, the physical queue name. This destination queue name travels with the message in a separate data area, the transmission header, until the destination queue has been reached after which the transmission header is stripped off.
You will be changing the queue manager part of this queue name when you create parallel classes of service. Remember to return the queue manager name to the original name when the end of the class of service diversion has been reached.
As discussed above, the remote queue definition object is used in three different ways. Table 2 explains how to define each of the three ways:
The application provides only the queue name when opening a queue, and this queue name is the name of the remote queue definition.
The remote queue definition contains the names of the target queue and queue manager, and optionally, the definition can contain the name of the transmission queue to be used. If no transmission queue name is provided, the queue manager uses the queue manager name, taken from the remote queue definition, for the transmission queue name. If a transmission queue of this name is not defined, but a default transmission queue is defined, the default transmission queue is used.
The application, or channel program, provides a queue name together with the remote queue manager name when opening the queue.
If you have provided a remote queue definition with the same name as the queue manager name, and you have left the queue name in the definition blank, then the queue manager will substitute the queue manager name in the open call with the queue manager name in the definition.
In addition, the definition can contain the name of the transmission queue to be used. If no transmission queue name is provided, the queue manager takes the queue manager name, taken from the remote queue definition, for the transmission queue name. If a transmission queue of this name is not defined, but a default transmission queue is defined, the default transmission queue is used.
Each time an application puts a message to a queue, it may provide the name of a reply-to queue for answer messages but with the queue manager name blank.
If you provide a remote queue definition with the same name as the reply-to queue then the local queue manager replaces the reply-to queue name with the queue name from your definition.
You may provide a queue manager name in the definition, but not a transmission queue name.
Table 2. Three ways of using the remote queue definition object
Usage | Queue manager name | Queue name | Transmission queue name |
---|---|---|---|
1. Remote queue definition (on OPEN call) | |||
Supplied in the call | blank or local QM | (*) required | - |
Supplied in the definition | required | required | optional |
2. Queue manager alias (on OPEN call) | |||
Supplied in the call | (*) required and not local QM | required | - |
Supplied in the definition | required | blank | optional |
3. Reply-to queue alias (on PUT call) | |||
Supplied in the call | blank | (*) required | - |
Supplied in the definition | optional | optional | blank |
|
For a formal description, see Appendix B, Queue name resolution.