Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

BizTalk 2010 Recipes : Messaging and Pipelines - Subscribing to Suspended Messages

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
4/1/2011 9:25:49 PM

1. Problem

A message fails at some point in your BizTalk solution (such as a receive port, map, or orchestration) and ends up as a suspended message on the BizTalk MessageBox. You want to be able to subscribe to these suspended messages and route them to a file drop.

2. Solution

This solution will introduce the method needed to subscribe to suspended messages by demonstrating how to use a receive port/filtered send port combination. The receive port will listen for messages of a certain type to arrive on the MessageBox. The send port will subscribe to all error messages generated by the receive port. All messages that are picked up by the receive port will fail because of not having a subscriber, and an error message will be written to the MessageBox. These messages will then be immediately routed to the send port, and a file will be written out to a specified file location.

The following steps walk through the steps necessary for creating the receive port:

  1. Creating a new one-way receive port in the BizTalk Administration Console. Enter the name of this port as SampleSubscribeToSuspended.

  2. On the General Tab, click the Enable Routing for Failed Messages box, as shown in Figure 1.

    Figure 1. Enabling routing
  3. On the Receive Locations tab, add a receive location to the port. Give a valid file path for the address of this location (such as C:\drop).

  4. Click OK. The receive port has been successfully configured and created.

  5. Right-click the receive location, and enable it.

The following steps walk through the steps necessary for the send port. You can set up additional subscribers—for instance, an orchestration—to allow for more complex processing. In this solution, the send port will simply write the suspended message out to a file drop. For any properties not listed in the following steps, keep the default values.

  1. Create a new one-way send port in the BizTalk Administration Console. Enter the name of this port as SampleSuspendedToFile.

  2. On the General tab, set Transport Type to File, and enter a valid file path to which to write outgoing files. Set Send Pipeline to PassThruTransmit.

  3. On the Filters tab, click the Property drop-down list, and select ErrorReport.ReceivePortName. Set the value equal to the name of the receive port created in the earlier steps (SampleSubscribeToSuspended). Do not use quotes.

  4. Click OK. You have successfully configured and created the send port.

  5. Do not enlist or start the send port at this time. At this point, the solution is complete—aside from the enlistment of the send port. Dropping a file on the receive location will cause the receive port to throw an exception and log to the Event Viewer—there is no subscriber. The error message has been routed to the MessageBox, but there is no subscriber for it either.

  6. Now, enlist and start the send port. The receive location will fail to find a subscriber. This time, however, the error will be routed to the send port, and the message will be written out to the send port file location.

3. How It Works

A number of properties are available on the ErrorReport object. This solution worked with one of these, ReceivePortName. Building a more complex solution using an orchestration will allow access to all the remaining properties. For example, assume that instead of a send port subscribing to the ErrorReport as shown in this solution, you have an orchestration with a receive port. The orchestration will receive the message, and you can then access the ErrorReport properties in the send port filter, receive filter of an orchestration, or within an Expression shape, as shown in Figure 2.

Figure 2. Accessing the ErrorReport properties
Other -----------------
- BizTalk 2010 Recipes : Messaging and Pipelines - Handling Pipeline Errors
- BizTalk 2010 Recipes : Messaging and Pipelines - Creating Custom Pipeline Components (part 2)
- BizTalk 2010 Recipes : Messaging and Pipelines - Creating Custom Pipeline Components (part 1)
- Windows Server 2008 Server Core : Recording System Status Information (part 3) - Managing Event Information with the WEvtUtil Utility
- Windows Server 2008 Server Core : Recording System Status Information (part 2) - Triggering System Events with the EventTriggers Utility
- Windows Server 2008 Server Core : Recording System Status Information (part 1) - Managing System Events with the EventCreate Utility
- SharePoint 2010 : Reviewing the Scope of an Existing Site Collection
- SharePoint 2010 : Creating a Site Collection
- SharePoint 2010 : Understanding Site Collection Options
- BizTalk 2010 Recipes : Messaging and Pipelines - Creating Flat File Send and Receive Pipelines
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server