Message flow control

 


Overview

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. If your queue manager is in a cluster, message flow is controlled using different techniques. 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.

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:

  1. Transmission queues
  2. Message channels
  3. Remote queue definition
  4. Queue manager alias definition
  5. Reply-to queue alias definition
The following techniques use these objects to create message flows in your system:

  • Putting messages to remote queues
  • Routing via particular transmission queues
  • Receiving messages
  • Passing messages through your system
  • Separating message flows
  • Switching a message flow to another destination
  • Resolving the reply-to queue name to an alias name

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.

 

Queue names in transmission header

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.

 

How to create queue manager and reply-to aliases

As discussed above, the remote queue definition object is used in three different ways:

  1. Using a remote queue definition to redefine a local queue name.

    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.

  2. Using a remote queue definition to redefine a queue manager name.

    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.

  3. Using a remote queue definition to redefine a reply-to queue name.

    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.

    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