Microsoft Message Queue - priority flag or separate queue?

I implemented a C # system that uses Microsoft Message Queue ( System.Messaging ) to communicate between related processes. In fact, several Sender services generate messages for queuing, and the number of Receiver processes keeps track of the queues and captures these messages when they arrive.

I was just told that there are some posts that will take precedence over others.

Messages can appear in waves, and there can potentially be cases when a very large number of messages are queued for one hit (say, a thousand or so), so there may be a delay before the final message is processed.

My initial thought was to have a second priority message queue, which is also monitored by each Receiver process in a different thread. There will be much fewer messages in this queue, so there will be less delay.

Then I came across the Message.Priority property.

So:

Should I use this priority flag instead of implementing another queue? Will he successfully and effectively retell these messages before the rest? If so, what conditions and side effects can there be, if any?

Or should I stick to my original plan and implement the next queue for priority messages?

+6
multithreading c # msmq
source share
2 answers

Should I use this priority flag instead of implementing another queue? Yes

Will he successfully and effectively retell these messages before the rest? Yes

If so, what conditions and side effects can there be, if any? No, MSMQ was designed that way .

+5
source share

Obviously, the priority of the message is not required - http: //www.udidahan.com/2008/01/30/podcast-message-priority-you-arent-gonna-need-it \ . Udi talks about several different possible architectures and ways to configure the infrastructure using multiple endpoints instead of using msmq message priority. He also mentions that enabling message priority will increase memory usage on servers.

+3
source share

All Articles