Required information for highly available agents in Managed File Transfer
There are various types of information that you need to know about standard or bridge MFT agents that are running in a high availability configuration. This information includes the different methods by which the agent starts, how to identify the instance of the agent in the log file, and status information for the agent.
Starting an agent
If an attempt is
made to start another instance of the agent that is not configured as an HA agent, a check is first
made to see whether a lock can be acquired on the SYSTEM.FTE.HA.agent
name queue.
As the other instance was started in a non-HA mode, the lock
on the SYSTEM.FTE.HA.agent name queue will be acquired by this
instance. The agent continues initialization, but fails at a later point because the command queue
is opened exclusively by another instance.
BFGMQ1045I: Agent's system queue 'SYSTEM.FTE.COMMAND.SRC' is configured as either NOSHARE or DEFSOPT(SHARED). BFGAG0035W: The agent received MQI reason code 2042 when trying to open queue 'SYSTEM.FTE.COMMAND.SRC' on the queue manager 'MFTHAQM' with connection name 'localhost(1414)' and channel 'MFT_HA_CHN'. The agent will try the operation again every 30 seconds.
If an attempt is
made to start another instance of the agent that is not configured as an HA agent, a check is first
made to see whether a lock can be acquired on the SYSTEM.FTE.HA.agent
name queue.
BFGAG0194E: An instance of this agent is already running elsewhere. Hence this instance cannot continue and will end.
Starting the agent as a Windows serviceOn Windows, you can start an agent as a Windows service.
During start up, Windows starts the MFT agent in normal or HA mode. If the agent is configured to run in HA mode, the service runs as an active or standby instance, depending which instance acquires the lock first.
Identifying the instance type of an agent in the log file
BFGAG0192I: The agent has successfully initialized as an active instance.
BFGAG0193I: The agent has successfully initialized as a standby instance.
Agent status updates
As there are two instances of the same agent running, you need to have the information about both instances in the agent status publication.
Note that the active instance is the one publishing the status of both instances.
While publishing agent status, the active instance checks the age of the standby instance publication.
- standbyStatusExpiry is the expiry time for the standby status message to be
put to the command queue of the agent. The message expires if the active instance of an agent does
not process this message in that period.
By default, the value of standbyStatusExipry is 30 seconds. The message is also a low priority,
9, message to allow priority processing of transfer requests over standby status messages. - standbyStatusPublishInterval sets the frequency at which the standby instance publishes its state.
- Gets the message from the SYSTEM.FTE.COMMAND.<agent name> queue and delegates the message processing to a worker thread.
- The worker thread retrieves the contents from the message body, updates the agent status object with standby instance information, and notifies the agent status publisher to publish the status.
- The agent status publisher publishes the status.
Note that optimizations are done here to cache the standby status information. When a request is made, the agent status publisher checks the new status with the cached status, and publishes only if there is a difference.
The following diagram describes the flow the active or standby instances follow to publish the
status of an agent: