Message priorities
We can either set the priority of message to a numeric value, or let the message take the default priority of the queue.
You set the priority of a message (in the Priority field of the MQMD structure) when you put the message on a queue. We can set a numeric value for the priority, or we can let the message take the default priority of the queue.
The MsgDeliverySequence attribute of the queue determines whether messages on the queue are stored in FIFO (first in, first out) sequence, or in FIFO within priority sequence. If this attribute is set to MQMDS_PRIORITY, messages are enqueued with the priority specified in the Priority field of their message descriptors; but if it is set to MQMDS_FIFO, messages are enqueued with the default priority of the queue. Messages of equal priority are stored on the queue in order of arrival.
The DefPriority attribute of a queue sets the default priority value for messages being put on that queue. This value is set when the queue is created, but it can be changed afterward. Alias queues, and local definitions of remote queues, can have different default priorities from the base queues to which they resolve. If there is more than one queue definition in the resolution path (see Name resolution ), the default priority is taken from the value (at the time of the put operation) of the DefPriority attribute of the queue specified in the open command.
The value of the MaxPriority attribute of the queue manager is the maximum priority that we can assign to a message processed by that queue manager. We cannot change the value of this attribute. In IBM MQ , the attribute has the value 9; we can create messages having priorities between 0 (the lowest) and 9 (the highest).