You can read data from messages in a queue, transform the data according to your business rules, and then write the data to a target message queue by using IBM MQ Connector.
You can read or write data to IBM MQ in the delimited flat file, fixed-width flat file, or XML format. When you read from or write data to IBM MQ, you read data from or write data to the message header and message data components of an IBM MQ message.
When you run a mapping or mapping task, IBM MQ Connector interacts with the following components of the IBM MQ architecture:
•Queue manager
•Message queue
•IBM MQ messages
Queue manager
An application connects to a queue manager to send or receive messages through a message queue.
For example, IBM MQ Connector uses a queue manager to read source messages from a queue and write target messages to a queue. All message queues in an IBM MQ system belong to a queue manager. The queue manager provides functions to administer queues, create new queues, or control the operation of the queue manager.
Message queue
A message queue is a destination to which messages can be sent. One program sends a message to another by putting the message on a message queue. The message remains on the queue until the receiving application retrieves it.
For example, IBM MQ Connector reads messages from a queue and writes messages to a queue. The queue can either be a volatile buffer area in the memory of a computer or a data set on a permanent storage device set aside by the queue manager to hold messages.
IBM MQ messages
An IBM MQ message is a collection of data that one program sends to another program.
An IBM MQ message contains the following components:
•Message header
•Message data
Message header
The message header component contains data about the message on the queue. Message header data includes a message identification number, message format information, and other message descriptor data.
The following table lists all the fields in the message header component and the corresponding data types:
IBM MQ Message Header Field
Data type
Description
Strucid
String
Structure identifier
Version
Integer
Structure version number
Report
Integer
Options for report messages
Msgtype
Integer
Message type
Expiry
Integer
Message lifetime
Feedback
Integer
Feedback or reason code
Encoding
Integer
Data encoding
Codedcharsetid
Integer
Coded character set identifier
Format
String
Format name
Priority
Integer
Message priority
Persistence
Integer
Message persistence
Msgid
Binary
Message identifier
Correlid
Binary
Correlation identifier
Backoutcount
Integer
Backout counter
Replytoq
String
Name of reply queue
Replytoqmgr
String
Name of reply queue manager
Useridentifier
String
User identifier
Accountingtoken
Binary
Accounting token
Applidentitydata
String
Application data relating to identity
Putappltype
Integer
Type of application that put the message on queue
Putapplname
String
Name of application that put the message on queue
Putdate
String
Date when message was put on queue
Puttime
String
Time when message was put on queue
Applorigdata
String
Application data relating to origin
Groupid
Binary
Group identifier
Msgseqnumber
Integer
Sequence number of logical messages within group
Offset
Integer
Offset of data in physical message from start of logical message
Msgflags
Integer
Message flags
Originallength
Integer
Length of original message
Message data
Message data is the application data or the contents of the message body.
For example, if an application sends a list of customer names to another application, the customer names comprise the message data component of the message. The content and format of the message data is defined by the application that uses the message queue. IBM MQ does not enforce any structure on the content and format of the message data.