A MQ MFT transfer can go into recovery if a source agent is unable to communicate with a destination agent and hence is unable to transfer data. It could be due to a network issue or a destination agent is not sending acknowledgements back to source agent at expected intervals. In such cases a transfer is marked “Stalled” and the source agent will attempt to recover such transfers.
Prior to MQ v184.108.40.206, a source agent attempts recover such transfers until it succeeds or the transfer is cancelled. There was no way to set a limit on how long or how many times recovery must be attempted.
From MQ v220.127.116.11, MFT provides an option to limit the attempts a source agent makes to recover a stalled transfer. You could now use the –rt parameter on fteCreateTransfer command to set a timeout for recovery of transfer. The source agent will attempt to recover a stalled transfer for the specified timeout. The source agent starts timeout counter once a transfer goes into recovery. If transfer does not resume before the specified timeout, the transfer is marked failed and required clean-up is done. If a stalled transfer resumes before the timeout, the timeout counter is reset and is restarted again if the same transfer goes into recovery again.
Recovery timeout can be set using transferRecoveryTimeout property in agent.properties file. The property is valid only for the source agent. If set, this property is applicable to all transfers initiated from this agent unless it is overridden by fteCreateTransfer command.
The recovery timeout can be specified using MQExplorer GUI also and via fteCreateTemplate, fteCreateMonitor command also. You can also specify recovery timeout using transferrecoverytimeout in an Ant script.
It should be noted that the transfer recovery timeout counter starts after the wait for transfer acknowledgement destination agent times out. The transfer acknowledgement timeout is controlled by the transferAckTimeout and transferAckTimeoutRetries properties in agent.properties file. For example if transferAckTimeout is set to 60000 & transferAckTimeoutRetries is set to 1, then transfer recovery timeout counting begins after 60 seconds.
The following snippet describes setting of transfer recovery timeout in agent.properties file.
logTransferRecovery = true
The following two lines describe specifying transfer recovery timeout using commands.
fteCreateTransfer -sa AGENT1 -da AGENT2 –rt 150 -df C:\temp\transferredfile.txt C:\export\originalfile.txtc.
fteCreateTemplate -tn "all the xls files" –rt 300 -sa AGENT1 -sm QM1 -da AGENT2 -dm QM2 -df C:\transferred\*.xls C:\temp\*.xls
How to know if a transfer has timed out?
If a transfer has timed out, an error, BFGSS0081E is logged into the source agent's output0.log file. MQExplorer will also show the transfer as failed with a recovery timed out reason.
Following is an example of recovery timeout exception seen in the source agent's output0.log file
BFGSS0081E: Recovery of transfer ID: '414d512043514d4a5730312020202020ab0e50584ed04220' timed out after 60 seconds. The managed transfer has been terminated.