Message flow modification

You must modify the message flow so that each incoming message is converted to the format that corresponds to the data handler. This conversion must occur before the message is issued to the input queue of the connector.

For example, if you have configured the XML data handler, you must modify the message flow so that before any message is issued to the input queue of the connector, the message is converted to XML. To make this modification (for an XML data handler), add a compute node to the end of message flow. The compute node must contain the ESQL statements shown in Figure 4.

Figure 4. Setting the message format to XML


Figure 4 shows an sample view of a compute node configured to translate an incoming message to a format that the connector can understand. Once this compute node is enabled, an XML document representing the original message is issued to the connector input queue.

The fields in the ESQL text region from Figure 4 are as follows:

Set OutputRoot = InputRoot;

This copies the message for output.

Set OutputRoot.MQHRF2.Format = 'SO-CR';

This assures that the connector will check this format and convert the message appropriately.

SET OutputRoot.Properties.MessageFormat = 'XML';

This indicates to MQ Integrator Broker that the message should be converted to XML upon delivery.

Note:
If you have defined a custom format in the MQ Integrator Broker Message Repository Manager (MRM), you can convert the legacy format to XML by simply setting the message format to XML. This format is different from the MQHRF2. The OutputRoot.Properties.MessageFormat relates to the MRM, while OutputRoot.MQHRF2.Format is used to specify a message format for an application that is receiving messages.

Copyright IBM Corp. 1997, 2003