Sending Data to a JMS Queue

The following example demonstrates how to send data to a JMS queue through the 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 share the same database.
  • TIBCO MFT Platform Server for Windows is installed.
  • The JMS service is configured and started in TIBCO MFT Command Center and a JMS queue named MFT.Queue1 is created on JMS.
To send data to a JMS queue, you have to perform the following operations:
  1. Adding a JMS Server
  2. Adding a Transfer Definition
  3. Sending Data from Client to the JMS Queue

Adding a JMS Server

Click Servers > Add Server to open the Add Server page, and configure the following parameters in the Required Server Information section:
Field Description
Server Name Defines the name for the server that you add.
IP Address or fully qualified IP Name Defines the IP address or IP name for the server you add.
Type the address 127.0.0.1.
Note: This parameter is required for adding a server but is ignored for JMS because the JMS connectivity information is defined on the Configure JMS Service page.
Server Type Defines the type of the server that TIBCO MFT Command Center will be communicating with.

Select JMS.

OverrideJMSServiceConfiguration

Defines whether 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.

Adding a Transfer Definition

Click Transfers > Add Transfer to open the Add Transfer page, and configure the following parameters in the Required Transfer Information section:
Field Description
Client File Name Defines the name for the client file.
Server File Name Defines the name for the queue that you want to write.

Set this parameter to MFT.Queue1.

Directory Transfer Defines whether the transfer is a directory transfer.

Select No.

Description Defines a short description for the transfer that you add.
Authorized User Id Defines the ID of the authorized user.
Choose the user ID from the drop-down list that will be used to make this file transfer.
Note: You must have TransferRight assigned to your account.
Server Name Defines the name for the server.
Transfer Direction Defines the direction of the transfer: Upload to Server or Download to Client transfer.

Select Upload to Server.

Client Protocols Allowed Defines whether all client protocols are supported.

Select ALL.

Department Defines the department to which this transfer is assigned.

If you have one, set it here; if not , leave it blank.

Virtual Alias Defines the alias that the client uses for transfers.

For this example, JMSPlatform is used.

Configure the following parameters in the Additional Transfer Properties section:
Field Description
Data Type Defines which data type the system uses to write to JMS.

Select Text. This defines the system to write text data to JMS. Queues used by the BW interface require text data.

Binary defines the system to write byte data to JMS.

Delimiter Defines how the system handles record delimiter.
The following fields are available:
  • No: all data will be written to JMS as a single message.
  • CRLF: data will be split into individual JMS messages when CRLF is found.
  • LF: data will be split into individual JMS messages when LF is found.
Configure the following parameters in the JMS Properties section:
Field Description
Input Selector Defines the selector that is used to filter JMS messages when reading data from a JMS queue .
Note: This parameter is ignored when writing data to a JMS queue.
Output JMSType Property Defines the JMSType output property that is written when the file is sent to the JMS queue.

This parameter is set to JMSUpload.

Max Message Size Defines a maximum message size.

Valid values for this parameter are from 1K - 999K and 1M - 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

Click Add after you finish the configurations.

Sending Data from Client to the JMS Queue

On a command line, navigate to the Platform Server command line interface. The following command uses the settings in the previous steps 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 Client Protocols Allowed parameter in the transfer definition is set to ALL, this upload can also be performed by an FTP client, an SSH client, and a Desktop client if configured.