Subscribe to all messages in biztalk for logging

I want to create a send port that writes all messages going in and out of biztalk to file. My orgaiztion is using splunk. Splunk will import data from the file directory to make sense of the various messages.

Is it possible to create filter in a send port that subscribes to "everything"? I could solve this by applying filter for each message type in my system. However, there is a lot of messages going back and forth and I'm wondering if there a simpler solution?
I'm using biztalk 2013.

February 18th, 2015 3:16am

Hi

Enable tracking on all receive and Send ports.

Then all the message going back and forth  from BizTalk will be tracked in BizTalk Tracking data base (DTA).

You can retrieve data from DTA DB.

https://connectedthoughts.wordpress.com/2008/04/02/3-ways-of-programatically-extracting-a-message-body-from-the-biztalk-tracking-database/

There should be dedicated tracking host be running to move tracking data to DTA database for better performance.

Thanks &Regard

-Ammu.



  • Edited by Ammu4biz 2 hours 0 minutes ago
Free Windows Admin Tool Kit Click here and download it now
February 18th, 2015 3:46am

I want to create a send port that writes all messages going in and out of biztalk to file -  to a file is not possible with an out-of-box features.

If all the messages processed in your BizTalk does have message type i.e if you have used XML-Receive in the Receive Location, then simple solution like BTS.MessageType Exists as opposed to multiple filter for every messagetype as BTS.MessageType == YourSpecificMessageType will work ( as suggested in another forum for  exactly same question). Also you need to set the send ports Copy Mode to Append from its default setting of Create New. Append will append the received files content to a file as you asked rather than creating new file for every received file

But when you mean by messages processed in BizTalk, then messages received by Pass-through pipeline in Receive location is also message and they will have not MessageType property, so the above filter in the send port will not be subscribed.

Tracking in the send port may not help your requirement. You can consider having a custom archive pipeline component to archive the processed messages to a file, but still since you want to write the content to a file not to a disk, you may have file access issues since all the content will be written to a same file.

One option is have a custom pipeline component or Orchestration and use BizTalk CAT Instrumentation Framework adjust filter options, log the received messages to a file. If you use a custom pipeline component then you have to configure this pipeline in every port. If you use Orchestration, then you need to subscribe to a Orchestration message of type System.XML.XMLDocument and another filter and when the message in send out of this tracing Orchestration, change a context property to the other filter  so that the same message is not subscribed back by this Orchestration.

Regards,

M.R.Ashwin Prabhu

February 18th, 2015 4:59am

Hi Ashwin,

Why enabling tracking will not work here.

Thanks

Ammu.

Free Windows Admin Tool Kit Click here and download it now
February 18th, 2015 5:31am

Hi Ammu,

Give it a try and you will get to know.

Enabling tracking at the port will track the message and its context to tracking db not to a file as questioner asked. And you need to have a custom solution to extract the tracked data in to file as you mentioned. Enabling tracking in all the ports will also have maintenance issues as this could lead into performance issue later. Certainly its a simple solution but has more maintenance issues in long run when you need to track message from the ports.

February 18th, 2015 5:44am

Also bear in mind that any Pipeline and/or Map processing done on a Receive Port will not be reflected on the Message hitting the Message Box. Therefore subscribing to "all messages" will not give you the original message received (which is often the requirement). 

So you should consider Tracking or, even though not my cup of tea, an Archiving Pipeline Component.

Morten la Cour

Free Windows Admin Tool Kit Click here and download it now
February 18th, 2015 5:56am

Hi

Enable tracking on all receive and Send ports.

Then all the message going back and forth  from BizTalk will be tracked in BizTalk Tracking data base (DTA).

You can retrieve data from DTA DB.

https://connectedthoughts.wordpress.com/2008/04/02/3-ways-of-programatically-extracting-a-message-body-from-the-biztalk-tracking-database/

There should be dedicated tracking host be running to move tracking data to DTA database for better performance.

Thanks &Regard

-Ammu.



  • Edited by Ammu4biz Wednesday, February 18, 2015 9:25 AM
February 18th, 2015 11:43am

Thanks! This works perfectly:)
Free Windows Admin Tool Kit Click here and download it now
February 20th, 2015 9:46am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics