Creating a Send Port to Handle Orphan or Duplicate Messages
This topic describes how to set up a send port that you can use to delete orphan or duplicate messages.
Orphan or duplicate messages can be a problem if Microsoft® BizTalk Accelerator for RosettaNet (BTARN) receives additional copies of a message after the public-process orchestration has completed processing the first copy of the message. BTARN marks those messages as duplicates and suspends them. You can view these messages in the BizTalk Administration Console. For more information about BizTalk Administration Console, see "Using the BizTalk Administration Console" in the BizTalk Server Help.
Orphan or duplicate messages remain in the BizTalk Administration Console until you review or delete them. The most effective way of deleting them is to set up a send port with filters set for orphan or duplicate messages. You can move them using any transportation means available in BizTalk Server. For example, you can move them by using File transport. BTARN sends the orphan or duplicate messages as files to a location on a hard disk. This lets you to delete them easily. The port can be in the enlisted and stopped state, in which case all messages sent to it will show as suspended under that send port.
Note
Instead of creating a send port to handle duplicate/orphan messages, you can create a special pipeline component to delete these messages from the MessageBox database. You can use the FixMsg component in the BizTalk Server SDK as a template. You have to modify the IComponent.Execute
method to return null. This causes BizTalk Server to discard any message sent to a pipeline that contains the component. You have to compile this pipeline component and add it to a send pipeline, and then compile, deploy, and select the send pipeline for the sink port. For more information, see "CustomComponent (BizTalk Server Sample)" in BizTalk Server Help.
To create a send port to handle orphan or duplicate messages
In Visual Studio, on the View menu, click BizTalk Explorer.
In BizTalk Explorer, expand BizTalk Management Database, and then expand Send Ports.
Right-click Send Ports, and then click Add Send Port.
In the Create New Send Port window, select Static One-Way Port, and then click OK.
In the Static One-Way Send Port Properties window, in the Name box, type a name for the send port.
In the left pane, click Transport. In the right pane, click Transport Type, and select FILE for the transport type. Click the ellipsis button (...) next to Address (URI), type a location on your hard disk, and then click OK.
In the left pane, click Send, click Send Pipeline, and then select Microsoft.BizTalk.DefaultPipelines.PassThruTransmit.
In the left pane, click Filters and Maps, and then click Filters.
On the first line in the right pane, for Property, select Microsoft.Solutions.BTARN.GlobalSchemas.IsDuplicateMessage from the drop-down list, leave the Operator as ==, enter True for Value, and then select Or from the drop-down list for Group.
On the second line in the right pane, for Property, select Microsoft.Solutions.BTARN.GlobalSchemas.IsOrphanMessage from the drop-down list, leave the Operator as ==, and then enter True for Value.
Click OK.
In BizTalk Explorer, right-click the name of the send port, click Enlist. After the send port has been enlisted, right-click the send port, and then click Start.