In my previous post,
we talked about some basic BizTalk concepts. In this post, we’ll talk about
more of these concepts.
Before drilling into details about the BizTalk Server
Architecture, let’s talk bit about a design pattern called Pub/Sub.
What is Pub/Sub??
Publish/Subscribe (aka Observer) is a design
pattern that implies the following logic:
Consider a scenario where you tell your
brother “bro, when my friend ABC calls me, please tell him I’m waiting for
him at the XYZ place”
When you said such sentence, you just
created a subscription!! COOL
Next day, your friend ABC calls at home, … By
doing this, he just published a specific event.
If you previously worked with SQL Notification Services, you
should be familiar with this concept. When a particular data is altered on the
database, Notification Services sends a mail message for all subscribers.
BizTalk Server Architecture:

As shown above, BizTalk is composed from the following
components:
·
Cross-cutting component:
like Process Management Administration, Deployment, BI, Reporting, Monitoring,
etc …
·
Orchestrations: are
a BizTalk “workflow” that hosts some business process, we’ll take about it in
more details on next posts
·
Other Apps: It can
be any application that consumes BizTalk artifacts, it can be even your .Net
Console application that consumes a business process
·
Pipeline: a pipeline
is simple a pipeline that BizTalk messages should go through, it can be of
different types, it will take a bit of our focus in next posts
·
Adapters: or Transport Handlers, Converts message
contents from one format to another, more to come on this
·
MessageBox: this is
the most interesting part in the architecture; it’s a SQL database that keeps
our subscriptions configuration. Guided by a framework, it helps BizTalk
determines how to process all messages. In our previous example of Pub/Sub,
your brother brain acted as a MessageBox.
BizTalk Server Message:
·
BizTalk Message is a
typical XML Document. Important thing you should know about BizTalk
Message, that is “BizTalk message is immutable”, i.e.: after the message
is constructed, it can’t be changed.
·
This message can contain
some context properties that helps BizTalk routes this message to its correct
destination.
·
BizTalk also can route
messages according to its contents; known as Content-Based Routing (CBR)
Example: you have a message that
contains a customer order, you can configure BizTalk to route this kind of
messages to two different destinations according to the order quantity.
·
When can we consider the
message constructed? When it’s placed in MessageBox.
Message Lifecycle inside BizTalk:
Ok, let’s take it step by step:
1.
A message is received in
BizTalk at something called Receive Port
A receive port contains one or more
receive locations, Also Port can contain XSLT (Map) that transforms
messages from one format to another.
A receive location contains a
configuration of receive adapter and receive pipeline
A receive adapter: at this point,
the configured adapter reads the Stream and constructs a message and places it
on the pipeline
2.
The constructed message is
received on the pipeline, the receive pipeline contains 4 stages (we’ll take
about it more on next posts)
3.
The messaging engine takes
the output of the pipeline and places it on MessageBox.
This engine will detect where to route this
message according to subscriptions stored in MessageBox.
4.
In this step, the messaging
engine detected that a specific orchestration (Business Process) is waiting for
this message type, so it simply activates an instance of this orchestration
5.
After the message is
processed by the orchestration, it’s placed again on MessageBox
Again, Messaging engine detects where to
route this message according to the stored subscriptions
6.
Messaging engine detected a
Send Port waiting for this processed message,
A Send Port contains a configuration
of send pipeline and send adapter
By sending the processed message to the
send port, it’s grabbed by the Send Pipeline,
A Send Pipeline contains 3 stages
(more on upcoming posts)
A Send Adapter reads the message and
writes on a stream
See you next post, with “BizTalk artifacts”.
Mike