Using the BizTalk Messaging Engine
The following diagram illustrates the architecture of the Messaging Engine. It shows a scenario in which a message is received by an adapter and submitted into BizTalk Server.
Each adapter has its own instance of a TransportProxy object that it uses to interact with the Messaging Engine. Adapters perform work against the Messaging Engine in batches, which are processed atomically. A batch is a collection of operations such as SubmitMessage, SuspendMessage, or DeleteMessage.
The following is the sequence of events for the scenario where an adapter submits a message to the Messaging Engine:
The adapter creates a new message and connects the data stream to the message.
The adapter gets a new batch from the Messaging Engine.
The adapter adds the message to the batch to be submitted.
The batch is committed and queued up on the Messaging Engine thread pool.
The Messaging Engine thread pool starts processing the new batch.
The message is processed in the receive pipeline.
The receive pipeline produces zero or more messages. Pipelines can consume messages providing they do not return any errors. Receive pipelines can produce more than one message; typically this happens when the dissassembler component disassembles a single interchange into many messages. Typically the receive pipeline normalizes the submitted message into XML.
The message(s) produced by the pipeline will be processed in the mapper if mapping is configured.
The message(s) are published to the Message Agent or to the MessageBox database.
The Messaging Engine calls back the adapter to notify it of the outcome of the batch of work.