WebSphere MQ Adapter 6.5 | webMethods WebSphere MQ Adapter Documentation | webMethods WebSphere MQ Adapter Installation and User’s Guide Documentation | Adapter Services | Working with Messages in a Segment | Segmenting Outbound Messages | Segmenting Messages Programmatically With Your Own Code
 
Segmenting Messages Programmatically With Your Own Code
Perform the following procedure to segment messages programmatically.
*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:
*First message: Offset property field value = 0 and MsgFlag property field value = Segment
*Second message: Offset property field value =400andMsgFlagproperty field =Segment
*Third message: Offset property field value = 800 and MsgFlag property field = Last Segment