Set the transfer recovery timeout for individual transfers

We can set the transfer recovery timeout for an individual transfer from the command line, or with IBM MQ Explorer, or by using Apache Ant tasks. If there is a transfer recovery timeout value set in the agent.properties file, setting the transfer recovery timeout for an individual transfer overrides the value set in the agent.properties file.


We can set the transfer recovery timeout parameter for an individual transfer when we are:

  • Create a transfer either by using the fteCreateTransfer command, or by using IBM MQ Explorer.
  • Create a transfer template either by using the fteCreateTemplate command, or by using IBM MQ Explorer.
  • Create a resource monitor either by using the fteCreateMonitor command, or by using IBM MQ Explorer.
  • Copy or moving files by using the fte:filecopy or fte:filemove Ant tasks.

If you set a transfer recovery timeout value for an individual transfer, this value overrides the transfer recovery timeout value set in the agent.properties file (seeSet the transfer recovery timeout for all transfers for one source agent).


Procedure

  • To use the fteCreateTransfer or fteCreateTemplate command to set the transfer recovery timeout, specify the appropriate option for the -rt parameter:

      -1
      The agent continues to attempt to recover the stalled transfer until the transfer is successful. Using this option is the equivalent of the default behavior of the agent when the property is not set.

      0
      The agent stops the file transfer as soon as it enters recovery.

      >0
      The agent continues to attempt to recover the stalled transfer for the specified amount of time in seconds.

    Examples for the fteCreateTransfer command

    fteCreateTransfer -sa AGENT1 -da AGENT2 -rt -1 -df C:\import\transferredfile.txt C:\export\originalfile.txt
    fteCreateTransfer -sa AGENT1 -da AGENT2 -rt 0 -df C:\import\transferredfile.txt C:\export\originalfile.txt
    fteCreateTransfer -sa AGENT1 -da AGENT2 -rt 21600 -df C:\import\transferredfile.txt C:\export\originalfile.txt
    Examples for the fteCreateTemplate command
    fteCreateTemplate -tn "payroll accounts monthly report template" -rt -1 -sa PAYROLL -sm QM_PAYROLL1 -da ACCOUNTS 
    -dm QM_ACCOUNTS -df C:\payroll_reports\*.xls C:\out\*.xls 
    
    fteCreateTemplate -tn "payroll accounts monthly report template" -rt 0 -sa PAYROLL -sm QM_PAYROLL1 -da ACCOUNTS 
    -dm QM_ACCOUNTS -df C:\payroll_reports\*.xls C:\out\*.xls
    fteCreateTemplate -tn "payroll accounts monthly report template" -rt 21600 -sa PAYROLL -sm QM_PAYROLL1 -da ACCOUNTS 
    -dm QM_ACCOUNTS -df C:\payroll_reports\*.xls C:\out\*.xls 
    
    There is no -rt parameter for the fteCreateMonitor command. If you set the -rt parameter with the fteCreateTransfer command and also set the -gt parameter, the recovery timeout parameter is included in the XML document with the transfer definition that is generated when you run the fteCreateTransfer command. The resource monitor then uses this the XML document when you run the fteCreateMonitor command. In the following example, the transfer recovery timeout details would be included in the task.xml file:
    fteCreateMonitor -ma AgentName -md C:\mqmft\monitors -mn Monitor_Name -mt task.xml -tr "fileSize>=5MB,*.zip"
  • To use IBM MQ Explorer New Transfer, New Monitor, or New Template wizard page to set the transfer recovery timeout, select the required option in the Transfer Recovery Timeout (seconds) field:

      As Source Agent
      If you select As Source Agent, the transferRecoveryTimeout parameter value from the agent.properties file is used if it is set, otherwise the default behavior for transfer recovery timeout is applied.

      Numeric list box
      If you enter a time in seconds in the numeric list box, the agent continues to attempt to recover the stalled transfer for the specified amount of time.

      None
      If you select None, no transfer recovery timeout is set and the agent continues to attempt to recover the stalled transfer until the transfer is successful.

  • To set the recovery timeout by using Ant tasks. include the transferRecoveryTimeout option and value, with the fte:filecopy or fte:filemove elements for moving or copying files, for example: Example for fte:filecopy
    <fte:filecopy cmdqm="qm0@localhost@1414@SYSTEM.DEF.SVRCONN" 
                  src="agent1@qm1" dst="agent2@qm2"
                  rcproperty="copy.result" transferRecoveryTimeout="0">    
                    
    	<fte:filespec srcfilespec="/home/fteuser1/file.bin" dstfile="/home/fteuser2/file.bin"/>
    
    </fte:filecopy>
    
    Example for fte:filemove
    <fte:filemove cmdqm="qm0@localhost@1414@SYSTEM.DEF.SVRCONN" 
                  src=agent1@qm1 dst="agent2@qm2"
                  rcproperty="move.result" transferRecoveryTimeout=”21600”>
                        
        <fte:filespec srcfilespec="/home/fteuser1/file.bin" dstfile="/home/fteuser2/file.bin"/>
    
    </fte:filemove>   
    

Parent topic: Set a timeout for recovery of stalled transfers


Related concepts


Related tasks


Related information