Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BizTalk: terminate messages

If I need to build a specialized web app to be able to terminate messages processed by specific send ports, WMI is one option. Are there others? and are there pros/cons to each approach?

like image 864
Jeremy Avatar asked Dec 10 '25 21:12

Jeremy


1 Answers

You should be able to terminate messages programmatically by referencing the Microsoft.BizTalk.Operations.dll assembly. That will allow you to use the TerminateInstance method of the BizTalkOperations Class, which allows you to reference a remote BizTalk instance (using this constructor) without enabling remote WMI administrative access.

You may also need to reference Microsoft.BizTalk.Pipeline.dll in Visual Studio to get IntelliSense to work.

The BizTalk SDK includes a sample app that you can review, as well, to see how to look up a message instance, which you'll need for the parameter to the TerminateInstance method: http://msdn.microsoft.com/en-us/library/gg163868

For example:

BizTalkOperations _operations = new BizTalkOperations()
IEnumerable messages = _operations.GetMessages();
foreach (BizTalkMessage msg in messages)
…
like image 133
schellack Avatar answered Dec 13 '25 23:12

schellack



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!