I’m putting this one here just in case I forget about it again:
BizTalk Server 2006 introduced a very nice feature called Failed
Message Routing. This is usually enabled on Receive Ports to allow the developer
to handle failed inbound messages through BizTalk itself, as it allows the failed
message to be routed to another port or a dedicated error handling Orchestration.
This is a very cool feature you can use to deal with messages that fail processing
during the receive pipeline processing or that matched no active subscriptions on
the message box.
However, BizTalk 2006 also supports Failed Message Routing on Send Ports! The option
to enable them is hidden in the “Transport Advanced Options” section of the Send Port
Properties dialog:
This option provides an alternative to the use of delivery notifications in a BIzTalk
Orchestration, with the following advantages:
-
It doesn’t force an orchestration to wait until retries have been exhausted for the
delivery notification, so the sending orchestration can still do other work. - It allows the error condition to be handled in an asynchronous fashion
- It is a good replacement for delivery notifications in messaging-only scenarios.
A few things to watch out for:
-
The message is only routed after all retries configured on the send port have been
exhausted. -
You can combine Failed Message Routing with Delivery Notifications; the orchestration
will gets it’s notification and the failed message will still be routed. -
Like with Delivery Notifications, failed message routing will only happen if both the
primary and secondary transports fail delivery.