Failed message routing in BizTalk 2006 REALLY NICE !!!!

Failed Message Routing


By default, when a message fails (validation, transformation, routing failure, etc…) within a receive pipeline, the message is automatically placed into the message box as suspended.  Suspended messages can be viewed using HAT and notification of the offending message can be sent using MOM (Microsoft Operations Manager).  By default failed messages cannot be subscribed to by end points such as an orchestration or send port.  This was the default operation of failed messages in BizTalk Server 2004.

BizTalk Server 2006 introduces new functionality which provides additional flexibility in dealing with failed messages.  When a new receive port is created there is a property that can be set called “Generate error report for failed message” (see Figure 3). 


Figure 3: Receive Port Settings

When this property is checked failed messages will not be suspended.  Instead they will be sent to the message box and the following additional properties will be set.

• ErrorType
• FailureCode
• Description
• MessageType
• ReceivePortName
• SendPortName
• InboundTransportLocation
• OutboundTransportLocation
• RoutingFailureReportID

Of these all will be promoted properties with the exception of Description and RoutingFailureReportID.  By taking advantage of these additional context properties you can now create end-point filters, on an orchestration or sent port, that subscribe to these failed messages.  When used appropriately, failed message routing can be used for notifying users of failed messages or building rich error handling or message repair capabilities. 

Published Fri, Jun 3 2005 8:35 AM by Patrick Wellink
Filed under:

Comments

# re: Failed message routing in BizTalk 2006 REALLY NICE !!!!

Wednesday, January 03, 2007 7:52 PM by Seamless Integration Solutions

good info

# re: Failed message routing in BizTalk 2006 REALLY NICE !!!!

Monday, January 17, 2011 10:30 AM by ylo

how to get the application name from the suspended messages in BizTalk in a service? a snippet would help

# re: Failed message routing in BizTalk 2006 REALLY NICE !!!!

Monday, January 17, 2011 5:06 PM by Patrick Wellink

Well there is no such thing as an appliction on the message itself.

You could do some logic on receivelocation name and the see to what application it belongs.

Or you could stamp it on the context yourself there are loads of samples out there how to create a pipeline that does just that. Then you just configure that pipeline component in the receive location and the application name will be available on the context of the message.

# re: Failed message routing in BizTalk 2006 REALLY NICE !!!!

Wednesday, January 19, 2011 10:00 AM by ylo

hi..We have a different approach. We have successfully made a windows servcie in getting suspended messages from BizTalk and able to send it in ESB portal, however we still have a problem in getting the appliation name to which the error occurs. Any idea on these?

Thanks for the reply.

# re: Failed message routing in BizTalk 2006 REALLY NICE !!!!

Thursday, January 20, 2011 1:03 PM by Patrick Wellink

yep, you could use the Management stuff, i believe there is one on codeplex, it's used by the BizTalk Documentor, so go and download that one and see if you can get a list of all your receive locations and see to what app they belong. Then you should know the app....

I think it's quite easy to do so.....

# re: Failed message routing in BizTalk 2006 REALLY NICE !!!!

Friday, January 21, 2011 6:49 AM by ylo

hi patrick. can you give me the Management stuff that you are saying. This would be a great help for us. We just need the application name of the suspended messages from BizTalk.

thanks ahead.

# re: Failed message routing in BizTalk 2006 REALLY NICE !!!!

Friday, January 21, 2011 11:36 AM by ylo

We have created a windows service to get the BizTalk suspended messages and post it to the the ESB portal.  This service subscribes to WMI Suspended events and WMI Message Instance without consuming the suspended message in the BizTalk Suspended queue. It extracts the metada/context of the suspended message as well as the fault details  then logs them to ESB Portal using ESB 2.0 Framework API. We were able to log most of the context as well as some of the fault details to ESB although we are having issues left for getting the data from BizTalk for the following.

Fault Details Exception Details

Fault Code: Stack Trace:

Fault Description: Inner Exception Message

Failure Category: Source:

Fault Severity: Type:

Exception Type: Target Site

Error Type:

Application:

Application Scope:

Fault Generator:

Service Name:

From this list, the critical information for us to get is the “Application Name”. We tried using WMI on this but when we checked the available WMI classes, they do not have any method/object that would provide us these info.

# re: Failed message routing in BizTalk 2006 REALLY NICE !!!!

Friday, January 21, 2011 1:48 PM by Patrick Wellink

Have a look at http://biztalkom.codeplex.com/

I think there should be a way to get all applications, then get all the receive ports and next get all the receivelocations.

Put that in a cached dictionary and you should be able to match the app to the receivelocation..

Another way would be to put all the receive locations in the Business rule engine and let the business rule engine decide to what app a message belongs. ( would be a nice & fast & easy solution)

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Please add 4 and 5 and type the answer here: