Enterprise Integration Patterns
The Loan Broker MSMQ Example (Chapter 9)
This example is the executable version of the example in Chapter 9 of Enterprise
Integraiton Patterns (Addison-Wesley, ISBN 0321200683). The example is implemented
in C# and requires the following components:
- The Microsoft
.NET Framework 1.1 (http://msdn.microsoft.com/net)
- The Message
Queing component of the Windows operating system. This component
is part of Windows 2000, Windows XP and Windows 2003, but is not installed
by default. To install this component, enter the Control Panel, select Add
or Remove Programs. On the icon bar on the left select Add/Remove Windows
Components. Select the checkbox next to Message
Queueing. Since this examples uses only local queues, you do not have
to install the Active
Directory Integration subcomponent.
- Once the Message
Queing component is installed, make sure the Message
Queuing service is started. Open the Control Panel, select Administrative
Tools, then Services. Make sure the service Message
Queuing has a status of
Started. If not, highlight the service and select Start
from the Action
- Visual Studio
.NET 2003. While you can compile the C# files from the command
line, the included solution and project files require Visual Studio .NET 2003.
The sample has been tested with the Professional Edition.
Unzip the ZIP file into an empty directory. You should see sub-folders for
the individual programs, e.g. Bank and CreditBureau.
Double-click the file ComposedMessaging.sln.
This will start Visual Studio. Select "Build Solution".
Run TestLoanBroker.bat. This
batch script opens multiple command windows, one for each credit bureau (3)
and one for each bank (5). It also opens one window for the Loan Broker process
and one window for the test client. The test client sends 50 random requests
to the loan broker. After it receives all 50 responses, it displays summary
You can close the console windows by hitting the Enter key.