Priority in MSMQ (Microsoft Message Queuing)

T

tiger

Hi,

I have a question on Microsoft Message Queue. How do I give higher priority
to messages and get it process before others. I will like to use the
mechanism supplied by the queue service rather than relying on reading all
the messages and ordering them. Below I have a simple send and receive
(first come first serve).

System.Messaging.Message msg = new System.Messaging.Message();
msg.Body=myPayment;
MessageQueue msgQ =new MessageQueue(".\\Private$\\billpay");
msgQ.Send(msg);
msgQ.Formatter = new XmlMessageFormatter(arrTypes);
myPayment=((Payment)msgQ.Receive().Body); Your assistants will be greatly
appreciated. ThanksTiger
 
P

Peter Bromberg [C# MVP]

Tiger,
I don't believe the Message.Priority property makes the message get "read"
from the queue before messages with lower priority.

It's up to you to set a message property filter before you start reading
from the queue.
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top