BizTalk Utilities CV ,   Jobs ,   Code library
 
Go to the front page to continue learning about XML or select below:

Contents

ReBlogger Contents

Previous posts in BizTalk 2006

 
 
Page 1866 of 17337

Failed Message Routing

Blogger : Geekswithblogs.net
All posts : All posts by Geekswithblogs.net
Category : BizTalk 2006
Blogged date : 2008 Apr 04

One of the things Microsoft introduced with BizTalk 2006 is failed message routing.  Prior to this, developers had to come up with custom solutions to remove failed messages from the messagebox to prevent them from accumulating.  Now all one has to do is enable routing for failed messages on the receive ports and create an orchestration to consume these failed messages.  When a message comes into the messagebox, BizTalk tries to find a matching subscription based on the context properties of the message.  If no matching subscriptions are found, the message is suspended.  To demonstrate this we can create a receive location and drop in a XML file.  Checking in the Group Hub we find the following:

These messages can be handled if failed message routing is enabled for the receive port that handled the message. 

The other half of this solution is to create an orchestration to handle the failed messages.  For this example we’ll write the failed messages out to the file system.  The receive port is directly bound to the messagebox.

The properties of the message in this orchestration are shown below.  Rather than specifying a schema for the message type, declaring a value of XmlDocument makes this orchestration flexible enough to consume all types of failed messages rather than restricting it to a particular schema.

The receive shape in this orchestration has a filter expression to limit it to messages with an ErrorType context property value of FailedMessage.  There are a number of context properties that are included for all messages.

With this in place, messages that do not match any subscriptions are consumed by the orchestration and written to disk.


Read comments or post a reply to : Failed Message Routing
Page 1866 of 17337

Newest posts
 

    Email TopXML