[UNIX, Linux, Windows, IBM i]

MFT process controller overview

The IBM® MQ Managed File Transfer (MFT) process controller is responsible for starting an MFT agent, and restarting that process if it ends for any reason. There is one process controller for every agent process.

Note: The process controller is applicable to IBM MQ for Multiplatforms only.

[z/OS] On IBM MQ for z/OS® the agent process is restarted by Automatic Restart Manager (ARM). For more information on this, see Configuring MFT for the z/OS Automatic Restart Manager (ARM)

How the process controller works

When the fteStartAgent command is run, it starts up an instance of the process controller for that agent and the process controller then starts the agent process.

When the fteStopAgent command is run, it connects to the process controller for that agent and sends it a stop request. The process controller receives the request, stops the agent process and then shuts itself down.

The process controller monitors the agent process. If the agent process stops unexpectedly, the process controller restarts it.

By default, if an agent process stops five times within a two minute period, the process controller shuts itself down and does not try to restart the agent again. In this situation, you need to restart the agent manually, using the fteStartAgent command.

You can change this behavior by modifying the following agent properties:
  • maxRestartCount
  • maxRestartDelay
  • maxRestartInterval

If you have configured an agent to connect to its agent queue manager using the BINDINGS transport, the process controller creates a connection to this queue manager when it starts up. The process controller then monitors this connection.

If the connection is broken because the queue manager has become unavailable, the process controller stops the agent and then attempts to re-establish the connection at regular intervals.

The time period between reconnection attempts is determined by the agent property agentQMgrRetryInterval. Once the queue manager is available again and the process controller has been able to connect to it, the process controller restarts the agent process.
Note: When an agent is configured to connect to its agent queue manager using the CLIENT transport, the agent process remains active if it becomes disconnected from the queue manager. In this situation, the agent process tries to reconnect itself at regular intervals.

For more information on the four properties mentioned in this section, see the Advanced agent properties: Process controller section of The MFT agent.properties file topic.

Process controller log files

The process controller writes informational messages to its event log. This is a file called pceventN.log, where N is a number, which can be found in the following directory: MQ_DATA_PATH/mqft/logs/coordination_qmgr_name/agents/agent_name/logs/

The size of each process controller event log file, and the number of historical files, is determined by the agent properties outputLogSize and outputLogFiles.

For more information on the properties mentioned in this section, see the Advanced agent properties: Tracing and logging section of The MFT agent.properties file topic.
Note: These properties are also used to determine the size and number of agent log files (called outputN.log) as well as the process controller log files.
The messages written to the process controller event log include the process identifier of the process controller, and the process identifier of the agent process. Some examples of these messages are shown here:

[21/06/2022 16:17:40.000 GMT Daylight Time]  00000000000049e0 
ProcessContro I BFGPC0003I: IBM MQ Managed File Transfer process controller started. 
Log files located at: C:\ProgramData\IBM\MQ\mqft\logs\QM1\agents\AGENT1.
 
[21/06/2022 16:17:55.000 GMT Daylight Time]  00000000000049e0 
ProcessContro I BFGPC0007I: IBM MQ Managed File Transfer process controller with process 
identifier 18736 started AGENT1@QM1 with process identifier 1748.

[21/06/2022 16:19:20.000 GMT Daylight Time]  00000000000049e0 
ProcessContro I BFGPC0027W: Process has ended with return code 1 and will be 
restarted to attempt to recover the problem.

[21/06/2022 16:19:20.000 GMT Daylight Time]  00000000000049e0 
ProcessContro I BFGPC0007I: IBM MQ Managed File Transfer process controller with process 
identifier 18736 started AGENT1@QM1 with process identifier 1304.

Here, the process controller associated with the agent AGENT1 was running with process identifier 18736.

Initially, it started the agent process – the process identifier for this process was 1748.

Shortly after the agent started, the process controller detected that it had stopped unexpectedly and so restarted it. Following the restart, the process identifier for the agent process is 1304.