Segmentation and reassembly by queue manager

 

This is the simplest scenario, in which one application puts a message to be retrieved by another. The message might be large: not too large for either the putting or the getting application to handle in a single buffer, but too large for the queue manager or a queue on which the message is to be put.

The only changes necessary for these applications are for the putting application to authorize the queue manager to perform segmentation if necessary:

   PMO.Options = (existing options)
   MQPUT MD.MsgFlags = MQMF_SEGMENTATION_ALLOWED
and for the getting application to ask the queue manager to reassemble the message if it has been segmented:
   GMO.Options = MQGMO_COMPLETE_MSG | (existing options)
   MQGET

The application buffer must be large enough to contain the reassembled message (unless you include the MQGMO_ACCEPT_TRUNCATED_MSG option).

If data conversion is necessary, the getting application might have to do it by specifying MQGMO_CONVERT. This should be straightforward because the data conversion exit is presented with the complete message. Do not attempt to convert data in a sender channel if the message is segmented, and the format of the data is such that the data-conversion exit cannot carry out the conversion on incomplete data.

 

Parent topic:

Message segmentation


fg12700_