Getting started with Managed File Transfer

IBM® MQ Managed File Transfer (MFT) transfers file between systems in a reliable, managed and secured way. File transfer activities are logged and this can be used for activity logging. You can configure Managed File Transfer agents and enable queue managers to perform transfers.

Managed File Transfer (MFT) provides two topologies:

  1. Single queue manager topology : uses a single queue manager as the agent queue manager, command queue manager, and coordination queue manager. These terms are described in the next section.
  2. Multiple queue manager topology : uses multiple queue managers that act as the agent queue manager, command queue manager, and coordination queue manager. More specifically, this topology requires at least three queue managers: one acting as the coordination queue manager, one as the Source Agent queue manager (for creating a Managed File transfer agent) and command queue manager, and a third queue manager acting as the Destination Agent Queue Manager (for creating an another File transfer agent) and a command queue manager.
Note: In the multiple queue manager topology, you can have the required queue managers all on cloud, all on-prem, or a mixture of both.

MFT is an integrated component of IBM MQ Advanced. For the latest and complete details of this product, see Managed File Transfer in IBM Knowledge Center.

Components of IBM MQ MFT

There are three main components of IBM MQ Managed File Transfer: Coordination Queue Manager responsible for the collection of agent status, transfer status, and transfer activity information, Command Queue Manager the interface queue manager that bridges the MFT commands and the IBM MQ infrastructure, and Agents that each have their own set of queues associated with a queue manager (agent queue manager) and it is the key for sending and receiving the files, that are transferred (o agents are created on system where files are to be transferred from or to).

This tutorial includes the following exercises:

  1. Configure the IBM MQ as a Service queue manager(s) to be an MFT Coordination, Command, and Agent queue manager, and then create MFT Agents (as source or destination agent). The tutorial provides steps for both of the supported topologies.
    • Single Queue Manager Topology: Single queue manager is configured as agents queue manager, commands queue manager, and coordination queue manager.
    • Multiple Queue Manager Topology: In this topology multiple queue managers are used.
  2. Perform a File Transfer.

Prerequisites

In order to proceed with this tutorial, it is vital that you have completed the following prerequisites:

  1. Basic knowledge of MFT: to get a basic understanding on how MFT works with IBM MQ, see Managed File Transfer in IBM main documentation.

  2. Create an IBM MQ as a Service queue manager. If you do not already have an IBM MQ as a Service queue manager, you can create one by following Getting started with IBM MQ as a Service. You should have:
  3. IBM MQ Client. To complete this tutorial you require the IBM MQ command line tool runmqsc installed and in your PATH. If you do not have these commands, you can get them by installing the IBM MQ Client (see IBM MQ C client).
  4. IBM MQ MFT Component. To install the IBM MQ MFT component, refer to Installing Managed File Transfer in IBM main documentation.

Setting up your terminal environment

  1. Open a terminal window

    • This terminal will be the admin terminal, used to configure your coordination queue manager.
  2. Specify the queue manager details in an MQSERVER environment variable in the admin terminal by completing the following steps:

    • The runmqsc CLI requires that an environment variable is set to identify the remote queue manager that it should connect to. In the admin terminal, export MQSERVER variable with the following command:

    • For Windows:
      SET MQSERVER=CLOUD.ADMIN.SVRCONN/TCP/<HOSTNAME>(<PORT>)
    • For Linux®:
      export MQSERVER="CLOUD.ADMIN.SVRCONN/TCP/<HOSTNAME>(<PORT>)"
      • <HOSTNAME>
        - this is 'hostname' in the file connection_info.txt.
      • <PORT>
        - this is 'listenerPort' in the file connection_info.txt.

This step is required on any new terminal that will be used for remote administration of a queue manager, such as when using runmqsc CLI.

Step 1: Configure the IBM MQ as a Service queue manager for Managed File Transfer (MFT)

This section guides you to configure an IBM MQ as a Service queue manager as an agent queue manager. There are two widely used topologies for this configuration. You can choose either configuration and then follow the appropriate section:

Step 2: Initiate a File Transfer

In this section, you verify your MFT setup by performing a file transfer. This tutorial demonstrates the file transfer by using MFT CLI. The fteCreateTransfer command creates and starts a new file transfer from the command line. This command can start a file transfer immediately, schedule a file transfer for a future time and date, repeat a scheduled transfer one or more times, and trigger a file transfer based on certain conditions.

For simplicity, in this tutorial you create an immediate transfer. Follow the instructions in Initiating a managed file transfer to initiate a transfer. For more details about fteCreateTransfer, see fteCreateTransfer.

Retrieving connection_info.txt

To retrieve the connection_info.txt file containing queue manager connection details:

  1. Navigate to your IBM MQ as a Service UI by following the instructions in Getting started with IBM MQ as a Service.
  2. The queue manager view opens. Select the queue manager you want to retrieve the connection info from.
    Shows the queue manager view
  3. Click Connection information.
    Shows the connection information button
  4. Download this file in JSON text format.

Retrieving platformApiKey.json

To create or reset your administrator api key:

  1. Navigate to your IBM MQ as a Service UI by following the instructions in Getting started with IBM MQ as a Service.
  2. The queue manager view opens. Select the queue manager you wish to retrieve the connection info from:
    Shows the queue manager view
  3. Next, select the Administration tab:
    Shows the Administration tab selected
  4. Click Reset API Key button. The previous admin API key for this IBM MQ Username will no longer be valid.
    Shows the reset key
    (If the button says Create API Key, then you have not created an api key in this way before. Click the CreateAPI Key button.
  5. Click Download to download the platformApiKey.json file containing an admin username and apikey.
    Shows the download button

IBM MQ C Client

If you do not have the IBM MQ Client command line tool and samples (runmqsc, amqsputc, amqsgetc), you can download it from here.

  1. Select the latest package.
  2. Select the IBM MQ C redistributable client for your Operating System by ticking the box on the left of the package as shown below. It should have Redist in the file name. This tutorial was created using the Linux Ubuntu Operating system.
  3. Select to download via HTTPS, this will allow you to download the client directly through your browser as shown below.
    Shows how to download the client
    If you do not have this option, try in an alternative browser.
  4. After clicking on continue, you are redirected to screen shown below. Click on the symbol as shown by the red circle to begin your download.
    Shows the download options
  5. When downloaded, extract the file to a directory of your choice <PATH_TO_MQCLIENT_DIR>
    tar -xvzf <IBM-MQC-Redist>.tar.gz <PATH_TO_MQCLIENT_DIR>
  6. Add commands to path:
    export PATH=$PATH:<PATH_TO_MQCLIENT_DIR>/bin:<PATH_TO_MQCLIENT_DIR>/samp/bin