3.7. Message grouping in MQI

As explained in Chapter 2, “Messaging and the APIs” on page 11, message grouping lets us add some grouping logic to the messages without having to code all that logic into the application. The grouping is managed by the queue manager, and provides basic features such as ordering and group completion control.

The group identification is introduced in the message descriptor structure (MQMD) sent with the message, when using an MQPUT or MQPUT1 call.

Every message in the group must have the MQMF_MSG_IN_GROUP flag but the last one, which has an MQMF_LAST_MSG_IN_GROUP flag instead. The order of the messages in the group is stored in the MsgSeqNumber field of the MQMD structure, which is generated automatically by the queue ...

Get MQSeries Programming Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.