Description
Microsoft Message Queuing’s (MSMQ) integration with the Windows Communication Foundation (WCF) is extremely powerful. It enables MSMQ developers to write fault-tolerant, service-oriented applications and provides a robust extensibility model developers can use to improve any system’s capabilities – including MSMQ’s. In this video and corresponding sample we'll convert a System.Messaging application into a WCF Queuing application, enable that application to overcome MSMQ’s 4mb message size limitation with a prototype chunking channel, and integrate it seamlessly with existing MSMQ applications.
Why SOA'ize MSMQ with WCF
Microsoft Message Queuing (MSMQ) is an incredibly robust, time-tested messaging server that fulfills a critical role in any communications platform. What it doesn’t do however, is play well in a service oriented world. MSMQ applications and their developers must be fully aware of the queue’s they’re communicating with and hand-craft messages to be sent on the wire. In a Service Oriented Architecture (SOA) world, we don’t think in terms of message in queues, we think in terms of business operations allowing developers to focus on what’s most important…business operations. Centering application development around these operations enables us to be flexible with not only with our implementations, but also our communication partners. In addition, the extensibility mechanisms provided when we integrate MSMQ with Windows Communication Foundation (WCF) are extremely powerful and enable MSMQ developers to do things they never could before.
What We'll Cover
Combining the power of MSMQ with the flexibility of WCF, we'll do the following:
- Get the feel for an existing System.Messaging (MSMQ) demo application
- Implement the equivalent application using WCF Queuing (MSMQ + WCF)
- Integrate a prototype MSMQ chunking channel into the application enabling us to send messages > 4mb in size over MSMQ
- Use the MSMQ Integration binding to send messages from the original System.Messaging sender to a new WCF receiver for processing
There are a couple ways you can walk-thru this sample:
- Watch a Video
- Read a Doc (PDF)
- Note: copying & pasting code from the PDF doesn't work as well as from the doc file.
Once you've met the prereqs. below, select either of these to get started.
Prereqs
Before we get started, you’ll need to ensure your machine has the following:
- .Net framework 3.0 or greater (http://msdn2.microsoft.com/en-us/netframework/aa569263.aspx)
- MSMQ Installed (http://msdn2.microsoft.com/en-us/library/aa967729.aspx)
- Visual Studio 2005 or greater (http://www.microsoft.com/express/)
- The sample solution for this walk-thru
Good luck and happy SOA'ng!
About the Author
Justin Wilcox is the former test lead of Microsoft Message Queuing (MSMQ), System.Messaging, and WCF Queuing contributing to releases from '03 to '08.