Combining LINQ with System.Messaging
Patrick Toolis of the MSMQ test team has written a great whitepaper on using LINQ (Language-Integrated Query) with MSMQ via system.messaging. It's twelve pages long with a number of screenshots and diagrams, so I'm not going to try to post it directly into the blog. Instead, here is a summary and a link to the paper.
Language-Integrated Query (LINQ) provides a way to embed SQL-like query statements into code which iterates over enumerable data. The library System.Linq provides an extension to C# and Visual Basic which allows traditional query syntax to be used in source code. Because the query is embedded in the source, it gets the advantage of compiler facilities such as type-checking, unlike queries in strings which are just text data to the compiler. MSMQ's system.messaging provides enumerators for a number of objects, allowing application writers to use LINQ when dealing with them, particularly messages in queues.
Comments
Anonymous
February 09, 2008
PingBack from http://www.biosensorab.org/2008/02/09/combining-linq-with-systemmessaging/Anonymous
February 24, 2008
For some reason I missed the article appearing on the MSMQ product group's blog a couple of weeks agoAnonymous
February 17, 2013
Hi great article. But is Linq to MSMQ threadsafe? How can I query the queue in a thread-safe manner?