One of the duties of an ESB is monitoring. In BizTalk you can use Message Tracking to track the message body and message properties. There is only one but, Tracking a lot of data can be bad for the performance so Microsoft recommends that you should only enable the minimum tracking required for your application, as this will reduce the amount of data logged and lower the risk of tracking bottlenecks.

So, it can be useful in a development- or test environment but you can't use this feature in a production environment! But also in a production environment you want to be able to track message bodies. MongoDB could be a very good alternative to track message bodies because MongoDB is a web scale database, and doesn't use SQL or JOINs, so it's high-performance. An other advantage is that it is a document database. You can store the entire BizTalk message as a document in a collection but you can still search on specific items in the document.
I've always been a big fan of SQL Server so I was a bit skeptical about MongoDB but seeing is believing. The actual saving of a .XML message to MongoDB only takes 1 or 2 milliseconds!

 

Using a custom Itinerary Messaging Service for Message Body Tracking

The strength of the ESB Toolkit is that it’s highly extensible so you can create your own services to execute Itinerary steps. You can implement a custom Tracking Service to store the messages in MongoDB.
Custom TrackingService
 
At runtime you can use a tool like MongoVUE to find the messages that are stored in MongoDB.
Notice that in the Message also the InterchangeID value is available to match the Message Body with a Tracking Event in BizTalk.
MongoVUE find
 

You can match the Message Body that is stored in MongoDB with a tracked Message in BizTalk.
1. Open the BizTalk Administrator and Search For: Tracked Message Events
2. Click on an Event and use the Message ID to match the Message in the Event to the Message Body in MongoDB.

Tracking in BizTalk Admin Console

 

See Also

For more information on how to use MongoDB for Message Body Tracking see: