Introduction to Microsoft Message Queuing Services (MSMQ)
- Introduction to Microsoft Message Queuing Services (MSMQ)
- Message Queuing and MSMQ
- MSMQ Architecture
- Queues
- Programming MSMQ in Visual Basic
- What's Next
Introduction to Microsoft Message Queuing Services (MSMQ)
Distributed applications run on two or more computers. They communicate with one another by passing data over machine boundaries through appropriate network protocols. Most of these protocols use synchronous technologies, such as Remote Procedure Calls (RPC) and DCOM. The synchronous process model has a number of limitations, however. Message queuing provides an asynchronous programming model and a loosely coupled environment for different components of distributed applications.
This chapter teaches you the following:
The limitations of synchronous processing
Message queuing technology and Microsoft Message Queuing Services (MSMQ)
MSMQ architecture
How to write MSMQ applications in Visual Basic
Limitations of the Synchronous Processing Model
In a synchronous processing model, components interact with one another in a tightly coupled manner. DCOM applications are examples of synchronous processing, as shown in Figure 3.1.
In Figure 3.1, the client application in machine 1 interacts with the COM objects that are running on machine 2 using DCOM. This synchronous processing model has several limitations:
A synchronous processing system requires a reliable network connection. As in Figure 3.1, the client has no way to communicate with the server when the network is disconnected.
In a synchronous processing system, both communicating parties must be available at the same time. In Figure 3.1, if the COM objects on machine 2 are not up and running, calls from the client application fail.
In Figure 3.1, when the client application makes a call to the COM object on the server, it must wait for the server to finish its processing. If the server takes a long time to process a client call, the client application is blocked (or frozen) until the server finishes processing.
If machine 2 in Figure 3.1 is shut down for some reason, the calls from the client to the server fail. Therefore, the synchronous processing model is not fault tolerant and thus is not a robust architecture.