BizTalk - create log file for pipeline fault

374 Views Asked by At

I need to handle an application for the 2006 version.

Starting with this version, BizTalk can route fault messages, and that's pretty good. Let's say I'm receiving a badly-formatted positional txt file and a receive pipeline can't let the message get into the orchestration. I can see that between the 'Suspended Services Instances' I have my suspended service gone in error with its code and its pretty explicit description.

I would love to get all this data into a file (txt, xml, whatever) and route it into a dedicate folder, without using custom pipeline components or other libraries, just BizTalk out of the box functionalities.

Is it all possible?

This is the error I would love to capture, together with the body of the message, if possible

2

There are 2 best solutions below

5
Dan Toomey On

Yes, it is possible. If you set up Failed Message Routing on this receive port, you can create a filter subscription in another FILE send port for ErrorReport.ErrorType == "FailedMessage". This send port can save the error report and the original message out to a file.

Alternatively, you can have an orchestration subscribe to these failed messages if you want to do any further processing with them (e.g. logging of the error details).

See this article for some help with that, or view the official MSDN documentation here.

0
Dijkgraaf On

For later versions of BizTalk (Enterprise edition) you can install the ESB Toolkit and set up the The ESB Management Portal and Fault Message Viewer. This includes a BizTalk application that subscribes to failed messages and writes them to a databse where you can view both the message, the context properties of the message and the errors.