Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>MSMQ does support priority queuing of messages, however messages of the same priority are handled in order of arrival when dequeued. For example, if you send 3 messages, two of priority 7 and one of priority 0, then the first message of priority 7 that was received will be dequeued, followed by the second message of priority 7 that was received, finally followed by the message priority 0. You should not have to do anything special to process queued messages in their priority order...however just be aware that the "oldest" message of any given priority will be dequeued before the "newest" message of the same priority. It should also be noted that any transactional messages ignore their priority, IIRC.</p> <p>EDIT:</p> <p>While MSMQ supports priorities, it will not behave exactly like a priority queue. The two are different algorithms, with MSMQ being significantly more complex. When you set the priority of a message, not only does that <em>help</em> determine the order in which that message will be dequeued, it also affects the priority at which that message will propagate through the MSMQ service from sender/publisher to receiver/subscriber. Assuming you use the three lowest priorities (MSMQ supports 8 priorities, from 0 (lowest) to 7 (highest)), the following scenario might occur:</p> <p>0 = low, 1 = medium, 2 = high</p> <p>Sender sends messages with the given priorities at the specified times (minute:second):</p> <pre><code>0 @ 1:00 2 @ 1:00 0 @ 1:01 1 @ 1:02 1 @ 1:03 0 @ 2:01 2 @ 2:01 </code></pre> <p>Receiver queues up messages in its queue in the following order (assuming no messages are dequeued):</p> <pre><code>2 @ 1:00 2 @ 2:01 1 @ 1:02 1 @ 1:03 0 @ 1:00 0 @ 1:01 0 @ 2:01 </code></pre> <p>When you process messages from the receiver's queue, they will be processed in both order of priority, as well as the time received.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload