You can use the MRM domain to model a wide range of messages.
You can create message models to represent a wide range of message types, using the MRM domain with one or more optional physical formats; see The MRM domain. Messages in this domain are processed by the MRM parser.
WebSphere® Message
Broker uses the MRM parser to read and write messages that belong to the MRM domain. When reading a message, the MRM parser constructs a message tree from a bit stream. When writing a message, the MRM parser creates a bit stream from a message tree. The MRM parser is model-driven, and it is guided by a message dictionary, which describes the shape of the message tree (the logical model) and the bytes or characters in the bit stream (the physical format). A message dictionary is created automatically from a message set when it is added to the broker archive (bar) file. The operation of the parser depends on the physical format that you have associated with the input or output message:
- For CWF, the parser reads a set sequence of bytes, and translates them into the fields and values in the message tree.
- For TDS, the parser uses the Data Element Separation method to parse the bit stream. Depending on the values that you have set for the TDS physical format properties, this method might involve identifying delimiters, tags, fixed length elements, patterns, and so on.
- For XML, the parser identifies the XML markup language (tags and attributes), and creates the correct objects, modified by the values that you have set for the XML physical format properties.
In the MRM domain, the message is considered in two parts:
- The logical message model: the piece of the message that conveys the business data, devoid of its physical representation (how it appears in a bit stream on the wire). The logical message model is independent of platform and the way in which the message is constructed.
For example, if you define a message that conveys information about a debit of an individual's bank account, the message can be represented in different physical forms on the wire (in XML, or a fixed structure such as a COBOL copybook). The business meaning and data is the same in both cases; only the physical layout has changed.
- The physical representation: how the data is laid out physically on the wire. A single logical message model might have several different ways in which it can be represented physically.
This two-part definition can be useful because it handles situations in which you need to connect two different systems. For example, an application that expects data to be passed to it in the form of COBOL copybooks needs to communicate with a system that expects data in the form of XML. Both applications work with the same data, and you do not want to alter either application. By routing the messages through a broker, you can use a single logical model with multiple physical representations to provide the required transformation.
The following samples all use the MRM parser to process messages:
You can view samples only when you use the information
center that is integrated with the Message Brokers Toolkit.