java.lang.Object | *- com.ibm.mq.MQGetMessageOptions |
This class contains options that control the behavior of MQQueue.get().
This is an output field which indicates whether the retrieved message is in a group, and if it is, whether it is the last in the group. Possible values are:
Selection criteria that determine which message is retrieved. The following match options can be set:
Options that control the action of MQQueue.get. Any or none of the following values can be specified. If more than one option is required, the values can be added together or combined using the bitwise OR operator.
Using this option may cause problems when converting from single byte character sets to double byte character sets. Instead, do the conversion using the readString, readLine and writeString methods after the message has been delivered.
Segmenting and grouping
WebSphere MQ messages can be sent or received as a single entity, can be split
into several segments for sending and receiving, and can also be linked to
other messages in a group.
Each piece of data that is sent is known as a physical message, which can be a complete logical message, or a segment of a longer logical message.
Each physical message usually has a different MsgId. All the segments of a single logical message have the same groupId value and MsgSeqNumber value, but the Offset value is different for each segment. The Offset field gives the offset of the data in the physical message from the start of the logical message. The segments usually have different MsgId values, because they are individual physical messages.
Logical messages that form part of a group have the same groupId value, but each message in the group has a different MsgSeqNumber value. Messages in a group can also be segmented.
The following options can be used for dealing with segmented or grouped messages:
This is an output field that the queue manager sets to the local name of the queue from which the message was retrieved. This will be different from the name used to open the queue if an alias queue or model queue was opened.
This is an output field that indicates whether or not segmentation is allowed for the retrieved message is a segment of a logical message. Possible values are:
This is an output field that indicates whether the retrieved message is a segment of a logical message. If the message is a segment, the flag indicates whether or not it is the last segment. Possible values are:
The maximum time (in milliseconds) that an MQQueue.get call waits for a suitable message to arrive (used in conjunction with MQC.MQGMO_WAIT). A value of MQC.MQWI_UNLIMITED indicates that an unlimited wait is required.
Construct a new MQGetMessageOptions object with options set to MQC.MQGMO_NO_WAIT, a wait interval of zero, and a blank resolved queue name.