BizTalk Messaging Archive Custom Solution
Lately one of the questions asked on
BizTalk Server Forums
intrigued me. The question was how one could archive a message including its message context.
Archiving received message
As soon as a message reaches BizTalk it can go through one of the
(XMLReceive,PassThruReceive) and a message context is added to incoming message.
pipeline has a
XmlDisassembler pipeline component
on the disassembling stage.
Whenever an Xml message is received via the XmlReceive pipeline the
will do the following tasks:
Promote the "MessageType" context property by taking the combination of
in the format of: Targetnamespace#RootElement. So one of context properties BizTalk will set (promote) is the MessageType.
Remove Envelopes and disassemble the interchanges
Promote the content properties from interchange and individual document into message context based on the configured distinguished fields and promoted properties.
I will discuss here a custom disassembler pipeline component that will promote the “MessageType” context property and archive the message context and body to file. It will not perform the other two default actions by
XmlDisassembler pipeline component.
Pipeline component is targeted for
stage of the receive pipeline. The component category is CATID_DisassemblingParser will be set above the class amongst other attributes. Since the component is targeted at the disassembling stage the
needs to be implemented. This interface has two methods,
. In the
method you will find the implementation for archiving the received message.