Example: Setting user-defined properties on a file-to-message transfer
User-defined metadata is set as an IBM MQ message property on the first message written to the destination queue by the transfer. IBM MQ message properties enable an application to select messages to process, or to retrieve information about a message without accessing IBM MQ Message Descriptor (MQMD) or MQRFH2 headers.
About this task
Include the parameters -qmp true and -md account=123456 in the fteCreateTransfer command, to set the usr.account property to 123456 in the RFH2 header.
Procedure
Type the following command:fteCreateTransfer -sa AGENT_JUPITER -da AGENT_SATURN -dq MY_QUEUE@MyQM -qmp true -md account=123456 /tmp/source_file.txtIn addition to the standard set of IBM MQ message properties, the user-defined property is set in the message header of the first message written by the destination agent, AGENT_SATURN, to the queue, MY_QUEUE, on queue manager, MyQM. The header is set to the following value:
usr.account=123456
The prefix usr is added to the beginning of the name of the user-defined metadata.
- Example: adding a user-defined message property for a file-to-message transfer
If we are using Managed File Transfer for message-to-file managed transfers, we can include a user-defined message property for the resulting message.
Parent topic: Transfer data from files to messages
Related concepts
Related tasks
- Configure an agent to perform file-to-message transfers
- Example: Transferring a single file to a single message
- Example: Splitting a single file into multiple messages by length
- Example: Splitting a text file with a regular expression delimiter and including the delimiter in the messages
- Example: Splitting a text file into multiple messages using a regular expression delimiter
- Example: Setting IBM MQ message properties on a file-to-message transfer
- Starting a new file transfer
Related information