Recoverable Interchange Processing in Biztalk 2006

Biztalk 2006 introduces many new and exciting features.  One of these new features is Recoverable Interchange Processing for inbound receive interchanges.

First off, what is an Interchange?  An interchange is simply an item received by Biztalk.  In Biztalk terms, an interchange is typically used to define a message that contains several messages inside it. Some typical examples are batch flat files and Xml envelopes.

A specific example of this is a flat file document that contains a Header and many Detail records like this:

If we were to debatch this message using the flat file disassembler it would produce three single records.  In this case, it is one interchange that will produce three messages into the message box.

In Biztalk 2004, if a single record inside the flat file contained bad data the whole interchange (i.e. all the single messages) would fail.  In some business scenarios this is the desired behavior. 

This should not be confused with Adapter Batching.  Adapter batching will pick up and process many different interchanges together inside a configurable (usually) batch.  The interchanges inside a batch can fail in Biztalk 2004, just not individual messages inside a specific interchange.  Got it?

Biztalk 2006 now allows the option to fail the whole interchange or process just the non-errored single messages.  This is called Recoverable Interchange Processing.

Setting this up is as simple as setting the RecoverableInterchangeProcessing flag to True inside the XmlDisassembler pipeline component.  This can be done at runtime inside the Biztalk Server Admin tool without having to recompile any code. 

As the single messages are passing through the pipeline, the pipeline sets a new message property called BTS.InterchangeSequenceNumber.  When a single message inside an interchange fails, the sequence number along with useful message information is written to the event log.

Enough of my rambling…  How about taking a look at this for yourself.

Note this is based off of CTP build of Biztalk Server 2006.

Watch the video:

Download the sample:

See the readme.txt for setup instructions for the sample.  The default install is not configured to support recoverable interchanges.  You will need to change the property.

One additional point, I have heard that recoverable interchange processing will only work on flat files that have tag identifiers defined on the records.  I have not verified this but it makes sense.

This article is part of the GWB Archives. Original Author: Stephen W. Thomas

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.