Chapter 46. Message Queuing

WHAT'S IN THIS CHAPTER?

  • Message Queuing overview

  • Message Queuing architecture

  • Message Queuing administrative tools

  • Programming Message Queuing

  • Course order sample application

  • Message Queuing with WCF

System.Messaging is a namespace that includes classes for reading and writing messages with the Message Queuing facility of the Windows operating system. Messaging can be used in a disconnected scenario where the client and server needn't be running at the same time.

This chapter gives you information about the architecture and usage scenarios of Message Queuing, and then you dive into the classes from the System.Messaging namespace to create queues, and send and receive messages. You will see how to deal with getting answers from the server with acknowledgement and response queues, and also how to use message queuing with a WCF message queuing binding.

OVERVIEW

Before diving into programming Message Queuing in the rest of this chapter, this section discusses the basic concepts of messaging and compares it to synchronous and asynchronous programming. With synchronous programming, when a method is invoked, the caller has to wait until the method is completed. With asynchronous programming, the calling thread starts the method that runs concurrently. Asynchronous programming can be done with delegates, class libraries that already support asynchronous methods (for example, Web service proxies, System.Net, and System.IO classes), or by using custom threads (see Chapter ...

Get Professional C# 4 and .NET 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.