Configuring the REST API for MFT timeout values

You can configure the length of time, in minutes, after which the REST API for MFT stops trying to connect to the coordination queue manager after the connection is broken. The default timeout is 30 minutes. You can configure this timeout by using the setmqweb command.

Before you begin

[MQ 9.3.5 Feb 2024][Linux]Note: If the mqweb server is runs in a stand-alone IBM® MQ Web Server installation, this task is not applicable. The REST API for MFT is not available in a stand-alone IBM MQ Web Server installation.
To complete this task, you must be a user with certain privileges so that you can use the dspmqweb and setmqweb commands:
  • [z/OS]On z/OS®, you must have authority to run the dspmqweb and setmqweb commands, and write access to the mqwebuser.xml file.
  • [UNIX, Linux, Windows, IBM i]On all other operating systems, you must be a privileged user.
[z/OS]Attention:

Before you issue either the setmqweb or dspmqweb commands on z/OS, you must set the WLP_USER_DIR environment variable so that the variable points to your mqweb server configuration.

To set the WLP_USER_DIR environment variable, issue the following command:
export WLP_USER_DIR=WLP_user_directory
where WLP_user_directory is the name of the directory that is passed to crtmqweb. For example:
export WLP_USER_DIR=/var/mqm/web/installation1

For more information, see Create the mqweb server.

About this task

You can configure the timeout for the REST API for MFT.

The REST API for MFT attempts to re-establish the connection immediately after the connection to the coordination queue manager is broken. If this attempt fails, there is an interval of five minutes between every reconnection attempt, until the timeout has passed. Therefore, setting a value between 0-5 results in only one attempt to reconnect.

After the reconnection times out, the next attempt to reconnect is made when any of the REST API for MFT resources are invoked. If this reconnection attempt fails, MFT again attempts to reconnect every five minutes until the reconnect timeout has passed.

Procedure

  1. View the current configuration of the REST API for MFT by using the following command:
    dspmqweb properties -a
    The mqRestMftReconnectTimeoutInMinutes field shows the reconnection timeout value, until the MFT Transfer Rest services stops attempting to connect to the coordination queue manager.
  2. Configure the timeout, in minutes, after which the REST API for MFT stops trying to connect to the coordination queue manager:
    • Reset the timeout to the default value of 30 minutes:
      setmqweb properties -k mqRestMftReconnectTimeoutInMinutes -d
    • Set the timeout:
      setmqweb properties -k mqRestMftReconnectTimeoutInMinutes -v time
      where time specifies the time, in minutes, before the timeout occurs.

      If this value is set between 0-5, the REST API for MFT tries to reconnect to the coordination queue manager only once. If the connection fails, there are no attempts to re-establish the connection until the REST API is invoked.

      If this value is set to -1, the REST API for MFT attempts to reconnect until the connection is successful.

  3. Restart the mqweb server by entering the following commands:
    endmqweb
    strmqweb

What to do next