Reference messages

 

Not supported in WebSphere MQ for z/OS.

This method allows a large object to be transferred from one node to another without storing the object on WebSphere MQ queues at either the source or the destination nodes. This is of particular benefit when the data already exists in another form, for example, for mail applications.

To do this, you specify a message exit at both ends of a channel. For information on how to do this, see WebSphere MQ Intercommunications.

WebSphere MQ defines the format of a reference message header (MQRMH). See the Application Programming Reference for a description of this. This is recognized by means of a defined format name and might be followed by actual data.

To initiate transfer of a large object, an application can put a message consisting of a reference message header with no data following it. As this message leaves the node, the message exit retrieves the object in an appropriate way and appends it to the reference message. It then returns the message (now larger than before) to the sending Message Channel Agent for transmission to the receiving MCA.

Another message exit is configured at the receiving MCA. When this message exit sees one of these messages, it creates the object using the object data that was appended and passes on the reference message without it. The reference message can now be received by an application and this application knows that the object (or at least the portion of it represented by this reference message) has been created at this node.

The maximum amount of object data that a sending message exit can append to the reference message is limited by the negotiated maximum message length for the channel. The exit can return only a single message to the MCA for each message that it is passed, so the putting application can put several messages to cause one object to be transferred. Each message must identify the logical length and offset of the object that is to be appended to it. However, in cases where it is not possible to know the total size of the object or the maximum size allowed by the channel, design the sending message exit so that the putting application just puts a single message, and the exit itself puts the next message on the transmission queue when it has appended as much data as it can to the message it has been passed.

Before using this method of dealing with large messages, consider the following:

 

Parent topic:

Handling messages greater than 4 MB long


fg12740_