Transfer data from files to messages
You can use the file-to-message feature of WebSphere® MQ File Transfer Edition to transfer data from a file to a single message, or multiple messages, on a WebSphere MQ queue.
To perform file-to-message and message-to-file transfers both the source and destination agent of the transfer must be version 7.0.3 or above. For information about message-to-file transfers, see Transferring 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.
You can transfer file data to WebSphere MQ message data. The WebSphere 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 a WebSphere 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 WebSphere 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 WebSphere 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 WebSphere MQ group ID.
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 WebSphere MQ group ID. If you 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 WebSphere MQ group ID set.
If you are transferring files to large messages, or many small messages, you might need to change some WebSphere MQ or WebSphere MQ File Transfer Edition properties. For information about, see Guidance for setting WebSphere MQ attributes and WebSphere MQ File Transfer Edition properties associated with message size.