Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Orchestration are single threaded?

Tags:

c#

biztalk

Can anyone confirm if a BizTalk orchestration is executed on a single thread? or multiple? During dehydration/resuming, would BizTalk engine create new thread or suspend/awake the same thread. I'm thinking of using Thread Context to store a unique request Id, that will be used to group activity logs in database

Thanks

like image 226
usman shaheen Avatar asked Mar 03 '26 12:03

usman shaheen


1 Answers

Your only guarantee is that a single shape will be executed in a single thread without interruption. The next shape might be executed on a different thread, a different processor or even a different machine!

So using ThreadContext to store data between different shapes is definitely a bad idea. There is a reason why Orchestration variables exist and why they must be serializable!

If you want to group your activity logs, use the Orchestration Instance ID, which is guaranteed to stay the same over the lifetime of the orchestration.

like image 154
TToni Avatar answered Mar 06 '26 03:03

TToni



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!