Receiving Data from a JMS Queue

The following example demonstrates how to receive data from a JMS queue.

Prerequisites

Ensure that you have completed the following tasks:

  • The JMS Service in Command Center has been configured and is started. See TIBCO Managed File Transfer Command Center User's Guide for more information.
  • A JMS queue named MFT.Queue1 has been created in JMS.
Note: Sending data to a JMS queue requires both TIBCO MFT Command Center and TIBCO MFT Internet Server.

Procedure

  1. Add a JMS server.
    1. Click Servers > Add Server to open the Add Server page, and configure the following parameters in the Required Server Information section:
      Parameter Description
      Server Name Configure the server name.
      IP address This is a required parameter, but it is ignored for JMS because the JMS connectivity information is defined by TIBCO MFT Command Center.
      Server Type Select JMS.
      Override JMS Service Configuration Select the check box if you want to override the URL defined in the Configure JMS Server parameter.

      When the value is Yes, the URL defined in the IPAddress or fully qualified IP Name parameter overrides the URL defined in the Configure JMS Server parameter. When the value is No, the URL defined in the Configure JMS Server parameter is used, and the URL defined in the IP Address or fully qualified IP Name parameter is ignored.

  2. Add a transfer.
    1. Click Transfers > Add Transfer to open the Add Transfer page, and configure the following parameters in the Required Transfer Information section:
      Parameter Description
      Client File Name Configure the client file name.
      Server File Name Configure the name of the queue you want to write. For this example, enter MFT.Queue1.
      Note: If you want to make this dynamic, you can use the #(FileName) token.
      Directory Transfer Click No. Downloads require transfers to be file transfer not directory.
      Description Provide a short description.
      Authorized User Id Select the user ID from the list that will be used to make this file transfer.
      Note: The user must have TransferRight assigned to his account.
      Server Name Select the JMS server that you created in Step 1.
      Transfer Direction Click Download to Client.
      Client Protocols Allowed Select ALL.
      Department if you have a department for this transfer to be assigned, set it here. If not, leave it blank.
      Virtual Alias Add the alias that the client will use for transfers. In this example, enter JMSDOWN.
    2. In the Additional Transfer Properties section, and configure the following parameters:
      Parameter Description
      Data Type This parameter is ignored when reading from a JMS queue.
      Delimiter Configure how the system to handle record delimiter.

      The available options are as follows:

      • CRLF: CRLF delimiters will be added at the end of each JMS message read.
      • No: all messages will be read from JMS and written as a single record.
      • LF: LF delimiters will be added at the end of each JMS message read.
    3. In the JMS Properties section, and configure the following parameters:
      Parameter Description
      Input Selector filters data when reading a JMS queue. Default is to read all data in a queue.
      Output JMSType Property This parameter is ignored on download requests and can be left blank.
      Output Property this parameter is ignored on download requests and can be left blank.
      Max Message Size This parameter is ignored on a download.
      Write EOF Message

      Defines whether MFT will write an empty JMS message at End Of File. This message will indicate that the entire file has been written and will not contain any message data. Supported values are:

      Yes - Write an empty message indicating end of file. JMS header property "LastMessage" will be "true" for the empty message and "false" for messages that contain data.

      No - Do not write an empty message indicating end of file

    4. Click Add.
  3. Receive data from the JMS queue to a client.
    Go to the client from which the data will be sent. The following example assumes a JMS queue MFT.Queue1 has been defined in JMS. FTP Command Line is the client in this example; however, any client could be used.
    get /JMSDOWN/MFT.Queue1 c:\test.txt