Pipeline components are an advanced aspect of BizTalk often overlooked or often implemented in a manner that breaks the careful streaming model of BizTalk Server. Implementing pipeline components in a truly stream based way allows BizTalk to process messages of arbitrary and effectively unlimited size. This example shows how to use a stream to archive received messages in a way that avoids reading the entire message into memory.
BizTalk Message Archiving - it's a pipeline component that can be used for archiving incoming/outgoing message from any adapters. It provides an option to save the message to either file (local, shared, network) or in SQL Server.Both are excellent samples and show different aspects of message archiving and alternatives ways to do it. I believe all solutions combined can be use full for anyone has a requirement for message archiving and feels that a custom solution is the best fit.