IBM MQ message properties read by MFT from messages on source queues
The agent reading messages from a source queue in a message to file transfer reads the IBM MQ message properties from the message. The value of these properties can be used to determine the behavior of a transfer.
Headers used to cancel message to file transfers
Set the following IBM MQ message properties on the last message in a group to cancel the message to file transfer of that group:
- usr.UserReturnCode
- Required. The return code of the transfer. Set this header as a non-zero value to indicate that the transfer is to be canceled.
- usr.UserSupplement
- Optional. Text describing why the transfer was canceled.
If the source agent of a message to file transfer reads a message from the source queue that has the usr.UserReturnCode message property set to a non-zero value, it stops reading messages from the queue and reports that the transfer failed in the transfer log XML. The transfer log XML contains the return code and supplementary text that is set in the message headers. If the destination agent has already written data to a temporary file this file is deleted from the destination.
Headers used by variable substitution
The value of any IBM MQ message property in the first message to be read from the monitored queue can be substituted into the task XML definition. User-defined message properties are prefixed with usr., but do not include this prefix in the variable name. Variable names must be preceded by a dollar sign ($) character and enclosed in braces ({}). For example, ${destFileName} is replaced with the value of the usr.destFileName message property of the first message to be read from the source queue.For example, the user or program putting messages to a monitored queue can set IBM MQ message properties on the first message in a group specifying which agent is to be used as the destination of the file transfer and what file name to transfer the data to.
For more information, see Monitor a queue and using variable substitution.
Parent topic: Managed File Transfer administration referenceRelated reference
- MQ message properties set by MFT on messages written to destination queues
- fteCreateTransfer: start a new file transfer
Related information
- Transfer data from messages to files
- Configure an agent to perform message-to-file transfers
- Example: Failing a message-to-file transfer using IBM MQ message properties