MQe messages destined for MQ pass through the bridge and are converted into an MQ format, using either a default transformer or one specific to the target queue. A custom transformer offers much flexibility, for example it is good practice to use a subclass of the MQe message class to represent messages of a particular type over the MQe network. On the gateway a transformer can convert the message into an MQ format using appropriate mapping between fields and MQ values and adding specific data to represent the significance of the subclass.
The default transformer from MQe to MQ works in conjunction with the MQeMQMsgObject class. This class is a representation of all the fields you could find in an MQ message header.
Using the MQeMQMsgObject, your application can set values using set() methods. Therefore, when an MQeMQMsgObject, or an object derived from it, is passed through the default MQe transformer, (that is the MQeBaseTransformer), the MQeBaseTransformer gets the values from inside the MQeMQMsgObject, and sets the corresponding values in the MQ message, for example, the priority value is copied over to the MQ message.
If the message being passed is not an MQeMQMsgObject, and is not derived from the MQeMQMsgObject class, the whole MQe message is copied into the body of the MQ message. This is referred to as funneling. The message format field in the MQ message header is set to indicate that the MQ message holds a message in MQe funneled format.
MQ messages for MQe are handled similarly to those travelling in the other direction. The default transformer inspects the message type field of the MQ header and acts accordingly.
If the MQ header indicates a funneled MQe message, then the MQ message body is reconstituted as the original MQe message that is then posted to the MQe network.
If the message is not a funneled MQe message, then the MQ message header content is extracted, and placed into an MQeMQMsgObject. The MQ message body is treated as a simple byte field, and is also placed into the MQeMQMsgObject. The MQeMQMsgObject is then posted to the MQe network.