Message groups

Segmentation is not supported on WebSphere MQ for z/OS.

Messages can occur within groups. This allows ordering of messages (see Logical and physical ordering), and, except on WebSphere MQ for z/OS, segmentation of large messages (see Message segmentation) within the same group.

The hierarchy within a group is as follows:

Group
This is the highest level in the hierarchy and is identified by a GroupId. It consists of one or more messages that contain the same GroupId. These messages can be stored anywhere on the queue.
Note:
The term "message" is used here to denote one item on a queue, such as would be returned by a single MQGET that does not specify MQGMO_COMPLETE_MSG.

Figure 3 shows a group of logical messages:

Figure 3. Group of logical messages

Three messages, named LOGMSG1, LOGMSG2, and LOGMSG3, are shown with lines connecting them to a single group identifier. This simple diagram is extended in the next figure.

Logical message
Logical messages within a group are identified by the GroupId and MsgSeqNumber fields. The MsgSeqNumber starts at 1 for the first message within a group, and if a message is not in a group, the value of the field is 1.

Logical messages within a group can be used to:

Each message within a group consists of one physical message, unless it is split into segments. Each message is logically a separate message, and only the GroupId and MsgSeqNumber fields in the MQMD need bear any relationship to other messages in the group. Other fields in the MQMD are independent; some may be identical for all messages in the group whereas others may be different. For example, messages in a group may have different format names, CCSIDs, encodings, and so on.

Segment
Segments are used to handle messages that are too large for either the putting or getting application or the queue manager (including intervening queue managers through which the message passes). For more information about this, see Message segmentation.

A segment of a message is identified by the GroupId, MsgSeqNumber, and Offset fields. The Offset field starts at zero for the first segment within a message.

Each segment consists of one physical message that may or may not belong to a group (Figure 4 shows an example of messages within a group). A segment is logically part of a single message, so only the MsgId, Offset, and SegmentFlag fields in the MQMD should differ between separate segments of the same message.

Figure 4 shows a group of logical messages, some of which are segmented:

Figure 4. Segmented messages

Three messages, named LOGMSG1, LOGMSG2, and LOGMSG3, are shown with lines connecting them to a single group identifier, as in the previous figure. In this version of the diagram, however, connecting lines show how LOGMSG1 is made up of two segments, called SEG1 and SEG2. LOGMSG2 has no segmentation. LOGMSG3 is shown by connecting lines to be made up of three segments, called SEG1, SEG2, and SEG3.

For a description of logical and physical messages, see Logical and physical ordering. For further information about segmenting messages, see Message segmentation.



© IBM Corporation 1993, 2002. All Rights Reserved