Segmenting Messages Programmatically With Your Own Code
Perform the following procedure to segment messages programmatically.
![*](icon_task_xpe.png)
To segment messages for outbound adapter services that
WebSphere MQ Adapter segments
1. Configure a Put service using Designer.
For detailed instructions on how to configure a Put service, see
Configuring Put Services.
2. On the MQMD Header tab in the Put adapter service editor, set the MsgFlags property field to one of the following values:
Value | Description/Action |
Segment | The user segments the beginning and the middle sections of the message. |
Last Segment | The user segments only the last portion of the message. |
3. Set the Offset property field to a value that represents the offset of the segment in the original message.
For example, when you have a 1200K message on the queue, then the three segmented messages are set to the following Offset values and MsgFlag values:
![*](chapterTOC_bullet.png)
First message:
Offset property field value =
0 and
MsgFlag property field value =
Segment![*](chapterTOC_bullet.png)
Second message:
Offset property field value =
400and
MsgFlagproperty field =
Segment![*](chapterTOC_bullet.png)
Third message:
Offset property field value =
800 and
MsgFlag property field =
Last Segment