What is Microsoft Message Queuing (MSMQ)? How does it work?

balaweblog picture balaweblog · Dec 30, 2008 · Viewed 97.6k times · Source

I need to work with MSMQ (Microsoft Message Queuing). What is it, what is it for, how does it work? How is it different from web services?

Answer

tvanfosson picture tvanfosson · Dec 30, 2008

With all due respect to @Juan's answer, both are ways of exchanging data between two disconnected processes, i.e. interprocess communication channels (IPC). Message queues are asynchronous, while webservices are synchronous. They use different protocols and back-end services to do this so they are completely different in implementation, but similar in purpose.

You would want to use message queues when there is a possibility that the other communicating process may not be available, yet you still want to have the message sent at the time of the client's choosing. Delivery will occur the when process on the other end wakes up and receives notification of the message's arrival.