[MQ 9.2.1 Dec 2020][z/OS]

Planning your MFT infrastructure with IBM MQ for z/OS queue sharing groups

You need to consider the following, if you are using IBM® MQ Managed File Transfer (MFT) , when one or more of the agents, command or coordination queue managers are part of an IBM MQ for z/OS® queue sharing group.

See MFT topology overview for a description of agents, command queue managers, and coordination queue managers.

Agent queue managers

Normally an MFT agent connects to a single agent queue manager, and uses local queues that are only accessible by that queue manager. The agent is informed which queue manager to connect to, by providing it with the queue manager name when the agent is first created.

With IBM MQ for z/OS, it is possible to create the agent and replace the queue manager name with the name of a queue sharing group (QSG). This means that the agent can connect to any available queue manager in the QSG to perform file transfers. Should there be a failure of the queue manager that the agent is currently connected to, the agent detects the failure and reconnects to an alternative queue manager in the QSG.

Connecting an agent to a QSG in combination with the highly available agent support provided in IBM MQ 9.2.0, see Highly available agents in Managed File Transfer, allows very robust MFT topologies to be created.

For example, in the following figure Agent1 has been created so that its agent queue manager is a QSG consisting of two queue managers QM1 and QM2. The agent queues have been defined as shared queues, stored in the coupling facility.

This means that the agent can run on either LPAR 1 or LPAR 2 and connect to either QM1 or QM2. The files and data sets that the agent reads from, or writes to, are shared, meaning they can be accessed from either LPAR.

In addition, the agent has been configured to be a highly available agent. In the diagram the agent is active in LPAR 1 and a standby instance of the agent is running in LPAR 2.

This topology provides high resilience. Should either the agent running on LPAR 1 fail, or queue manager QM1 fail, or LPAR 1 fail the standby instance of the agent on LPAR 2 can take over and carry on processing file transfers from the point of failure.
Figure 1. Highly available MFT agent using a queue sharing group
Diagram representing an agent as a queue sharing group between two queue managers QM1 and QM2

Creating an agent that uses a QSG as the agent queue manager

You create an agent using the fteCreateAgent command. When doing this, the name of the queue sharing group is provided for the agent queue manager. For example:
fteCreateAgent -agentName Agent1 -agentQMgr QSG1 

This creates an agent called Agent1 which uses any queue manager that is a member of QSG QSG1 as its agent queue manager. In this configuration the agent connects to the agent queue manager using a cross memory (bindings mode) connection which means that the agent and the queue manager must be on the same LPAR. This is exactly like the example shown in figure 1 above.

When you run the fteCreateAgent command it generates a set of MQSC commands to create the necessary queues on the agent queue manager.

When the agent queue manager is a QSG, this set of commands needs to be modified so that each queue is created as a shared queue. That is, each queue needs to be created with QSGDISP(SHARED) and an appropriate coupling facility structure provided by the CFSTRUCT attribute.

The following example shows you how to change the MQSC command for creating the SYSTEM.FTE.COMMAND.AGENT1 queue as a shared queue. The changes to the defaults are in bold text.
Important: You need to make similar changes to all the other queues that the agent uses.
DEFINE QLOCAL(SYSTEM.FTE.COMMAND.AGENT1) +
 QSGDISP(SHARED) +
 CFSTRUCT(MFTSTRUCT) +
 DEFPRTY(0) +
 DEFSOPT(SHARED) +
 GET(ENABLED) +
 INDXTYPE(CORRELID) +
 MAXDEPTH(5000) +
 MAXMSGL(4194304) +
 MSGDLVSQ(PRIORITY) +
 PUT(ENABLED) +
 RETINTVL(999999999) +
 SHARE +
 NOTRIGGER +
 USAGE(NORMAL) +
 REPLACE

Creating an agent that uses a QSG as the agent queue manager and connects as a client

Agents can connect to their agent queue manager using a client channel. You can use this approach to allow the agent to run on distributed platforms while connecting to a QSG. If all queue managers in the QSG are licensed for IBM MQ Advanced for z/OS Value Unit Edition, then the agent can also connect to them from a z/OS LPAR that does not have a local queue manager.

This topology is shown in the following figure and allows the agent to take advantage of the resiliency of QSGs. If the queue manager in the QSG that the agent is currently connected to fails, then the agent automatically reconnects to a different member of the QSG and carries on processing.

The sysplex distributor is used to spread the connections from the agent across the available queue managers in the QSG.
Figure 2. MFT agents connecting to a queue sharing group as a client
Diagram representing agents connecting to a queue sharing group as a client

In order to make use of this topology, the queue managers in the QSG must each have a server connection channel defined for use by the agent. See Connecting a client to a queue sharing group for information on how to do this.

When creating the agent the queue managers need to be configured, so that they can use the channel that is defined to the QSG, and access it through the sysplex distributor. For example:
fteCreateAgent -agentName Agent1 -agentQMgr QSG1 -agentQMgrHost vipaAddress 
-agentQMgrPort sharedPort -agentQMgrChannel CHANNEL1

As previously stated the MQSC commands generated by running the fteCreateAgent command must be adjusted to specify QSGDISP(SHARED) and an appropriate coupling facility structure in the CFSTRUCT attribute.

Command queue managers

The MFT command queue manager can be part of a QSG. However, the name of a QSG cannot be used when specifying a command queue manager; you must use a specific queue manager name.

Coordination queue managers

The MFT coordination queue manager can be part of a QSG. However, as with a command queue manager, the name of a QSG cannot be used when specifying a coordination queue manager; you must use a specific queue manager name.

Commands connecting to a QSG

MFT provides a number of commands to managed agents, transfers and agent, command, or coordination queue managers. You can use only those commands that connect to an agent queue manager, if the queue manager is in a QSG.

Following is a list of the commands that connect to the agent queue manager:
  • fteCleanAgent
  • fteCreateAgent
  • fteCreateBridgeAgent
  • fteCreateCDAgent
  • fteDeleteAgent
Note that you must provide the name of the queue manager when running other MFT commands.