Transfer data from files to messages

We can use the file-to-message feature of Managed File Transfer to transfer data from a file to a single message, or multiple messages, on an IBM MQ queue.

To perform file-to-message and message-to-file transfers both the source and destination agent of the transfer must either be at IBM WebSphere MQ Version 7.5, or later, or at WebSphere MQ File Transfer Edition Version 7.0.3, or later. For information about message-to-file transfers, see Transfer data from messages to files.

The destination agent for a file-to-message transfer cannot be a protocol bridge agent or a Connect:Direct bridge agent.

We can transfer file data to IBM MQ message data. The IBM MQ messages can be read and used by applications. The following types of file-to-message transfer are supported:

  • From a single file to a single message. The message does not have an IBM MQ group ID set.
  • From a single file to multiple messages, by splitting the file into messages of a given length. The messages all have the same IBM MQ group ID.
  • From a single file to multiple messages, by splitting a text file at a Java regular expression delimiter. The messages all have the same IBM MQ group ID.
  • From a single file to multiple messages, by splitting a binary file at a hexadecimal delimiter. The messages all have the same IBM MQ group ID.

    To split a binary file using a sequence of bytes as the delimiter, use the -sqdb parameter of the fteCreateTransfer command. For more information, see -sqdb parameter.

By default the messages created by a file-to-message transfer are persistent. The messages can be set to be non-persistent or to have the persistence value defined by the destination queue.

If you specify that a file is split into multiple messages, all messages created from the file have the same IBM MQ group ID. If we do not specify that a file is split into multiple messages, only one message is created from the file and this message does not have the IBM MQ group ID set.

If we are transferring files to large messages, or many small messages, you might need to change some IBM MQ or Managed File Transfer properties. For information about, see Guidance for setting MQ attributes and MFT properties associated with message size.

Note: If the destination queue is either a clustered queue, or an alias to a clustered queue, you will get an error message when transferring a file into a queue if the agent property enableClusterQueueInputOutput has not been set to true. For more information see What to do if the destination queue is a clustered queue, or an alias to a clustered queue

Parent topic: Administer Managed File Transfer


Related tasks


Related reference


Related information