Microsoft BizTalk Server 2002 Fail Fast Tutorial and Sample AIC
Summary: Describes the fail fast process in which Microsoft BizTalk Server 2002 shuts down a schedule instance even if it is not completed. In order track schedule instances, the authors provide an Application Integration Component (AIC) that will check if all instances were completed, and re-try instances that were not completed. (1 printed page, plus a link to additional documentation and sample code)
Microsoft® BizTalk® Server 2002
The fail fast process involves Microsoft® BizTalk® Server 2002 shutting down a schedule instance even if it is not completed. In an XLANG schedule, there are four instances when the schedule starts the fail fast process.
- Failure to create a COM object used by the schedule
- Memory corruption or AV caught by the system
- Failure to create a queue
- Failure to send messages to the dead letter queue
In all of these cases, the DTC transaction rolls back and the XLANG schedule shuts down without calling any On Failure or Compensate code.
In highly sensible systems, this can force the developer to create a tracking mechanism to check if all instances were completed, and re-try instances that were not completed.
To make this process easier, we replaced the Generic AIC (BPO.Activation) with our own Application Integration Component (AIC) which sends a Message Queuing (also known as MSMQ) message to a tracking queue and only then sends it to the original private queue.
The target XLANG schedule should have a Remove Message action that simply pulls the message from the tracking queue.
Notice the following:
- If no fail fast operation occurs during the XLANG schedule, the copied message is simply removed from the tracking queue.
- If a fail fast operation occurs at some point, the "Remove Message" operation does not occur, leaving the message in the tracking queue. We can, of course, mark the copy message's TimeToBeReceived property to some estimated time, so it is automatically move to the "Dead letter Queue."
Since many XLANG schedules are started using a message port we propose an AIC to automatically perform the described behavior.