How to write multiple suspended resumable messages to file?

Hi!

I have several hundred messages in suspended service instances which is resumable. The error is caused inside an orchestrationm where many messages arrive and populate a bigger xml file. The issue here, is that i want to save all the availible  suspended messages as xml files to a directory without manually saving them one by one, which is possible, but takes too long time.

I have tried several different approaches, one which uses a powershell script to call MSBTS_ServiceInstance with  the status 4 (resumable) to save every database record, but only returns 50 records? Is there a maximum number of returns here..?

Also tried many different approaches without actually getting all suspended messages from the database. Either is returns one or no messages at all.

Anyone got any idea around this?

June 29th, 2015 11:57am

Hi,

You should try BizTalk: Visual Basic script to deal with BizTalk suspended messages

Rachit

Free Windows Admin Tool Kit Click here and download it now
June 29th, 2015 12:56pm

Hi,

For the BizTalk  applications, there is the "Failed Message Routing" feature that you can be enabled on send ports and receive ports. The failed messages could then be easily subscribed to a send port to output to file.

Also WMI script Terminate.vbs has the option to save the messages before terminating the instances . you can also use the script as it is to save all the messages and terminate the instances from BizTalk Farm.

For the WMI script you can look into below blog post which can help you for bulk suspended message to be saved on your local disk.

Saving suspended messages in BizTalk (filtering on orchestration or port name)

Saving BizTalk Suspended Messages in Bulk using WMI

Thanks

Abhishek

June 30th, 2015 12:57am

Hi, i have tried that, since the orchestration contains all the messages, it only writes one message to file. It does not really loop through all the available messages in the database..
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2015 2:30am

Hi mate ,

Can you please let us know what you have tried  . I think you can get all the suspended instance (status 4) and then you can iterate through collection .

https://blog.tallan.com/2015/04/30/saving-biztalk-suspended-messages-in-bulk-using-wmi/

Thanks

Abhishek

June 30th, 2015 2:40am

Hi,

You can use powershell script or WMI scripts to save all the suspended instances in one go. Please refer this post;

http://blogs.msdn.com/b/biztalknotes/archive/2013/05/22/saving-suspended-messages-using-wmi-powershell-and-the-microsoft-biztalk-operations-assembly-part-i.aspx

Regards,

Sharad

Free Windows Admin Tool Kit Click here and download it now
June 30th, 2015 2:52am

Hi,

You can use powershell script or WMI scripts to save all the suspended instances in one go. Please refer this post;

http://blogs.msdn.com/b/biztalknotes/archive/2013/05/22/saving-suspended-messages-using-wmi-powershell-and-the-microsoft-biztalk-operations-assembly-part-i.aspx

Regards,

Sharad

This one works, but only writes out 50 messages..

There is people commenting in this post with the same problem.

June 30th, 2015 3:28am

You must try the script provided in the Part-2 of the post.

According to the post this issue has been addressed.

"The WMI caller script supplies the suspended instances one-by-one to the .NET assembly, which in turn spits out all the suspended messages for that instance. In this solution, you get all the suspended messages for a service instance, and not just a single message you get in a purely WMI solution."

Refer: Saving Suspended Messages using WMI, PowerShell and the Microsoft.BizTalk.Operations Assembly (Part II)

Rachit
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2015 1:31pm

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

Other recent topics Other recent topics