Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 322117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:54:30+00:00 2026-05-12T08:54:30+00:00

i am sending messages in MSMQ by setting its priority. using C# can i

  • 0

i am sending messages in MSMQ by setting its priority. using C#

can i get the message from MSMQ having high priority first?

just like we get in Priority Queue.

and one thing more..

suppose there are three priority level

0 – high
1- medium
2 – low

the sequence in queue is 2001122221111100

now if i send message with high priority(0) where it will be placed?? by setting priority in MSMQ. will it behave like actual Priority Queue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T08:54:30+00:00Added an answer on May 12, 2026 at 8:54 am

    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.

    EDIT:

    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 help 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:

    0 = low, 1 = medium, 2 = high

    Sender sends messages with the given priorities at the specified times (minute:second):

    0 @ 1:00  
    2 @ 1:00
    0 @ 1:01
    1 @ 1:02
    1 @ 1:03
    0 @ 2:01
    2 @ 2:01
    

    Receiver queues up messages in its queue in the following order (assuming no messages are dequeued):

    2 @ 1:00
    2 @ 2:01
    1 @ 1:02
    1 @ 1:03
    0 @ 1:00
    0 @ 1:01
    0 @ 2:01
    

    When you process messages from the receiver’s queue, they will be processed in both order of priority, as well as the time received.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 152k
  • Answers 152k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The quality of the plugins vary wildly. Some have been… May 12, 2026 at 10:08 am
  • Editorial Team
    Editorial Team added an answer var myBitmap : Bitmap = new Bitmap(myBitmapData); myBitmap.smoothing = true;… May 12, 2026 at 10:08 am
  • Editorial Team
    Editorial Team added an answer you start sqlcmd with the -b on error batch abort… May 12, 2026 at 10:08 am

Related Questions

I am just starting porting an application to ASP.net MVC and I have an
I am sending messages in JSON format to an ActiveMQ server. I am trying
I've been looking at examples of REST API's like Netflix http://developer.netflix.com/docs/REST_API_Reference#0_59705 and Twitter and
I am unable to consume messages sent via ActiveMQ from my Flex client. Sending
I am writing a program for POSIX (OSX) where I will have many processes

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.