MsgDeliverySequence (MQLONG)
Local | Model | Alias | Remote | Cluster |
---|---|---|---|---|
X | X |
- MQMDS_FIFO
- Messages are returned in FIFO order (first in, first out).
An MQGET call returns the first message that satisfies the selection criteria specified on the call, regardless of the priority of the message.
- MQMDS_PRIORITY
- Messages are returned in priority order.
An MQGET call returns the highest-priority message that satisfies the selection criteria specified on the call. Within each priority level, messages are returned in FIFO order (first in, first out).
- On z/OS®,
if the queue has an
IndexType
of MQIT_GROUP_ID, theMsgDeliverySequence
attribute specifies the order in which message groups are returned to the application. The particular sequence in which the groups are returned is determined by the position or priority of the first message in each group. The physical order of messages on the queue is not defined, as the queue is optimized for efficient retrieval of messages using the MQGMO_LOGICAL_ORDER option on the MQGET call. - On z/OS,
if
IndexType
is MQIT_GROUP_ID andMsgDeliverySequence
is MQMDS_PRIORITY, the queue manager uses message priorities zero and one to optimize the retrieval of messages in logical order. As a result, the first message in a group must not have a priority of zero or one; if it does, the message is processed as though it had a priority of two. ThePriority
field in the MQMD structure is not changed.
- The order in which messages are returned by the MQGET call is
determined by the values of the
MsgDeliverySequence
andDefPriority
attributes in force for the queue at the time that the message arrives on the queue:- If
MsgDeliverySequence
is MQMDS_FIFO when the message arrives, the message is placed on the queue as though its priority wereDefPriority
. This does not affect the value of thePriority
field in the message descriptor of the message; that field retains the value it had when the message was first put. - If
MsgDeliverySequence
is MQMDS_PRIORITY when the message arrives, the message is placed on the queue at the place appropriate to the priority given by thePriority
field in the message descriptor.
If the value of the
MsgDeliverySequence
attribute is changed while there are messages on the queue, the order of the messages on the queue is not changed.If the value of the
DefPriority
attribute is changed while there are messages on the queue, the messages are not necessarily delivered in FIFO order, even though theMsgDeliverySequence
attribute is set to MQMDS_FIFO; those that were placed on the queue at the higher priority are delivered first. - If
To determine the value of this attribute, use the MQIA_MSG_DELIVERY_SEQUENCE selector with the MQINQ call.