Implementing Enterprise Integration Patterns with BizTalk Server 2006 R2

Who does not know the book Enterprise Integration Patterns written by Greogor Hophe and Bobby Wolf? Or has visited their website. Patterns can help you solve design issues. For instance how can I split messages or how do route based on envelope or body (content) or aggregate information into one single message. So with patterns you can design integration solutions. Microsoft’s server product BizTalk Server can be used to create these kind of solutions. With BizTalk concepts like asynchronous messaging, orchestration, correlation and long-running transactions are possible and these concepts are important for enterprise integration solutions. In general these concepts can also be applied in other vendor- and technology providers.

In this post I will share how to implement a pattern in BizTalk Server 2006 R2. I will start with message routing pattern message broker. Question one can ask when to implemented a message broker is this: How can you decouple the destination of a message from the sender and maintain central control over the flow of messages?

Answer to this question is: Use a central Message Broker that can receive messages from multiple destinations, determine the correct destination and route the message to the correct channel.

In BizTalk Server 2006 R2, the Message Broker Pattern is still easy to implement compared to previous versions using for instance the BizTalk Server Pattern Wizard

The following sources will enable you to have a full understanding of this pattern:

Jeff Lynch - BizTalk Server 2004 - Message Broker Pattern
Chris G – Getting Into BizTalk
Jon Flanders – Pattern Wizard CodePlex
Jeffrey Judah - Implement a Centralized BizTalk File Creation Broker
Nilay Parikh - Pattern Wizard Video

Next pattern I would like to discuss is Scatter-Gather pattern. When does one need this pattern? Or ask the following question:

How do you maintain the overall message flow when a message needs to be sent to multiple recipients, each of which may send a reply?.

Answer: Use a Scatter-Gather that broadcasts a message to multiple recipients and re-aggregates the responses back into a single message.

You can download the Scatter Gather Implementation by downloading an example from Microsoft. Run the executable and open the solution.

The following links will enable you to have a full understanding of this pattern:

Danny Del Rio - Multi-Message Scatter and Gather Pattern
Final integration pattern
Shashikant - De-Batching and Re-Batching the Files (Scatter-Gather)
Arnulfo Wing - How does a BizTalk Guy pack?

I like to discuss with you is splitter pattern. Which one can use to break out the composite message into a series of individual messages, each containing data related to one. This can be useful when one needs to process items in a message differently. A Splitter publishes a one message for each single element (or a subset of elements) from the original message. This can be done through using a messaging solution or with an orchestration. Messaging is faster, but with an orchestration message(s) can processed. The following sources give you an excellent background on this pattern.

Matt Meleski - Splitter Pattern Using a Map and Orchestration
Darren Jefford - Looping around Message Elements
Jeff Lynch - Logical Message Splitting in BizTalk Server 2004

Hopefully you found this post useful. It was great fun digging in EAI patterns and try them out in a BizTalk Server 2006 R2 environment. Implementations and patterns are already out there in the world explained by bright people like Jeff Lynch and so on, but I wanted to try them out in the newest version of BizTalk and educate myself and share the experience and information with you.


Labels: ,