Archiving Original Messages in BTS

Link. October 23, 2007. Comments [0]. Posted in: BizTalk

Siva Ram asks in a comment on a previous post:

"How to Archive/(copy to another location) the Source file as it is , Before the biztalk picks up the file?"

I think what he's really asking is how he could archive an exact copy of the original incoming message (possibly for regulatory compliance, auditing, or simply to provide easier tracing of problems). This is a common question, and the truth is there are several ways to approach this in BizTalk server.

Here are some options:

Double Hop: A fairly simple option is to do a double hop when processing the incoming message. Instead of parsing and processing the message right away, receive it through a pass-thru pipeline (so the message isn't changed) and route it using filters to two FILE send ports. One of them points to your archive location, while the other points to a temporary folder, from which you pick up the message again using the FILE adapter to do the real processing.

This is a rather simple way to implement this, but it can be pretty inefficient. It's particularly bad if messages are large because it involves several round-trips to the message box.

Use BizTalk Tracking: For some scenarios, it is enough to just enable message tracking in your receive location, making sure to select the option to track the message before it goes through the pipeline. Messages will then be saved in your DTA database, from which you can query and retrieve them using HAT or WMI.

Use a pipeline component: Using a custom decoding pipeline component that writes the message out as it is read by the receive pipeline is another good option. It is a bit more complex to implement, but it can be very efficient if implemented properly. Jeff Lynch has a simple Archive component you can use to start, though be aware his version will not work if you're dealing with adapters that use non-seekable streams to hold message content. My own old Tracer pipeline component might also be a place to start with this.

I hope this gives you an idea of how to start fulfilling your requirement!



Comments are closed.

About

Tomas Restrepo is a software developer located in Colombia, South America. His interests include .NET, Connected Systems, PowerShell and lately dynamic programming languages. More...

tomasrestrepo @ twitter My Flickr photostream My saved links on delicious My Technorati Profile

email: tomas@winterdom.com
msn: tomasr@passport.com

View my profile on LinkedIn

MVP logo

Syndicate

Ads


Links

Categories

Statistics

Total Posts: 1020
This Year: 90
This Month: 9
This Week: 0
Comments: 791

Blogroll

Post Archive

Other

Copyright © 2002-2008, Tomas Restrepo.

Powered by: newtelligence dasBlog 2.1.8102.813

Sign In