Message queuing has traditionally been an integral part of distributed application programming. Products such as IBM's MQSeries are popular because they add an extra dimension that can't be achieved with a synchronous, connection-oriented communications mechanism such as Remote Procedure Call (RPC). This chapter explains why and when you should use queues in a distributed application and how queues can add responsiveness and reliability to an online transaction processing (OLTP) application that can't be achieved by other means.
You'll also learn about message passing and Microsoft Message Queue (MSMQ) programming, as well as how to send and receive messages with Microsoft Visual Basic. You'll learn common techniques for managing queues and messages, and you'll learn how to pack parameterized information into a message body and unpack it on the receiving side.
The chapter also explains transactional programming with MSMQ. You must send transacted messages to transactional queues in order to be guaranteed exactly one delivery. You'll learn two straightforward techniques for sending and receiving transactional messages with MSMQ and Visual Basic: You can leverage MSMQ's internal transactioning mechanism, or you can use a Microsoft Transaction Server (MTS) transaction.
The chapter concludes with a description of the queue types that you can use to create an MSMQ application: response queues, administration queues, journal queues, and dead letter queues.