+

Search Tips | Advanced Search

MsgDeliverySequence (10-digit signed integer) on IBM i

Message delivery sequence.

Local Model Alias Remote Cluster
X X
This determines the order in which messages are returned to the application by the MQGET call:

    MSFIFO
    Messages are returned in FIFO order (first in, first out).

    This means that an MQGET call will return the first message that satisfies the selection criteria specified on the call, regardless of the priority of the message.

    MSPRIO
    Messages are returned in priority order.

    This means that an MQGET call will return 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).

If the relevant attributes are changed while there are messages on the queue, the delivery sequence is as follows:

  • The order in which messages are returned by the MQGET call is determined by the values of the MsgDeliverySequence and DefPriority attributes in force for the queue at the time the message arrives on the queue:

    • If MsgDeliverySequence is MSFIFO when the message arrives, the message is placed on the queue as though its priority were DefPriority. This does not affect the value of the MDPRI field in the message descriptor of the message; that field retains the value it had when the message was first put.
    • If MsgDeliverySequence is MSPRIO when the message arrives, the message is placed on the queue at the place appropriate to the priority given by the MDPRI 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 will not necessarily be delivered in FIFO order, even though the MsgDeliverySequence attribute is set to MSFIFO; those that were placed on the queue at the higher priority are delivered first.

To determine the value of this attribute, use the IAMDS selector with the MQINQ call.

Parent topic: Attributes for queues

Last updated: 2020-10-04