Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I've a question: In case of multiple consumers (identical service) are listening/receiving messages from the only one MSMQ queue, do I need to lock the queue on Receiving message? To make sure that a message was processed only once.

In the other words, is it possible if two instances of a service running on two machines, competing on the same queue, getting the same message?

Your answer is greatly appreciated.
Posted
Comments
virusstorm 10-Jul-15 7:56am    
I'm curious about what you are trying to achieve. What is the goal of having two applications read from a single queue?
masilver 19-Jul-17 9:30am    
This is extremely useful and many (most?) messaging queues offer this. It's ideal if you want to have multiple applications processing queue items in parallel. For example, sending emails, or making a web spider, etc. If you can only have one consumer, you'll always be limited by that consumer's speed.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900