To fully understand how you can fine-tune a BizTalk solution for a low-latency scenario, you need to understand how BizTalk processes messages. Figure 10-1 shows the BizTalk architecture; the flow of a message through BizTalk is illustrated by the arrows on the diagram. I will discuss this flow in more detail shortly. As already discussed earlier in the book, at the center is the MessageBox, a durable publish-subscribe engine built in the database. The MessageBox services all of BizTalk's subservices (referred to as service classes). These include the Messaging Engine (in process and out of process), the Orchestration Engine, and the BizTalk Message Queue (MSMQT, T for Transport) adapter.
The flow through BizTalk is as follows:
The MSMQ adapter receives a message from a queue and submits it to the Messaging Engine.
The Messaging Engine performs some preprocessing on the message and then executes it through the receive pipeline.
The Messaging Engine invokes the Message Agent in order to publish the message to the MessageBox.
The message is published to the MessageBox, the subscriptions are evaluated during publication, and a reference to the message is placed in the appropriate application queue in the MessageBox.
The Message Agent dequeues the message and passes it to the Orchestration Engine.
The Orchestration Engine activates a new instance of the correct type of orchestration.
The orchestration processes the message and then posts it to a send port. ...