Sending Data to a JMS Queue

The following example demonstrates how to send data to a JMS queue through Platform Server Command Line interface.

Prerequisites

Ensure that you have completed the following tasks:

  • Both TIBCO MFT Command Center and TIBCO MFT Internet Server are installed and sharing the same database.
  • TIBCO MFT Platform Server for Windows is installed.
  • The JMS service has been configured and started in TIBCO MFT Command Center and a JMS queue named, MFT.Queue1, has been created on JMS.

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 Enter the address, 127.0.0.1.
      Note: This is a required parameter but is ignored for JMS because the JMS connectivity information is defined on the Configure JMS Service page in 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 Internet 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 is ignored for Internet Server because the Internet Server connectivity information is defined in the Local Settings section or the Remote Settings section on the System Configuration page.
      IP Port Configure the port that Internet Server is listening on. This is typically secure port 443.
      Server Type Select Internet Server.
    2. In the Internet Server Options section, and set the context name being used by Internet Server. This information can be found in the Remote Settings section of the System Configuration page for Internet Server.
  3. 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 For this example, enter MFT.Queue1.
      Note: If you want to make this dynamic, you can use the #(FileName) token.
      Directory Transfer Click No.
      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 Upload to Server.
      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 JMSUP.
    2. In the Additional Transfer Properties section, and configure the following parameters:
      Parameter Description
      Data Type set this value to Text. This tells the system to write text data to JMS (Queues used by the BW Interface require text data). Binary tells the system to write byte data to JMS.
      Delimiter Configurehow the system to handle record delimiter.

      The available options are as follows:

      • CRLF: data will be split into individual JMS messages when CRLF is found.
      • No: all data will be written to JMS as a single message.
      • LF: data will be split into individual JMS messages when LF is found.
    3. In the JMS Properties section, configure the following parameters:
      Parameter Description
      Input Selector This parameter is ignored for upload requests.
      Output JMSType Property Configure the JMS type output property that is written when the file is sent to the JMS queue. For this example, enter JMSUpload.
      Max Message Size Configure a maximum message size.

      The value range is from 1K to 999K and 1M to 10M. The default value is 1M.

      When a message exceeds this size, it will be broken up into multiple messages.

      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.
  4. Send data from a client to the JMS queue.
    On a command line, go to the Platform Server Command Line Interface. Use the following command to send the file to JMS:
    ftmscmd /send /file /destination:10.97.142.154 /port=46464 /remoteuserid=jmsuser
    /remotepassword=pwd c:\outgoing\testfile.txt JMSUP/MFT.Queue1
    Note: Because the transfer parameter Client Protocols Allowed is set to ALL, this upload can also be performed by any client if configured.