Here is another sample of a Sequential Convoy in BizTalk 2004. This is a little different then most, it contains a Parallel Action shape that allows for concurrent parallel processing of inbound messages.
What does this accomplish? It is all about control. This process allows for processing a pre-defined number of messages at the same time in a controlled manner.
Performance? Ok, it is not the fasting running Orchestration I have ever seen. Actually, in some of my tests this parallel action processed 1/2 to 1/3 less messages per minutes then a single process convoy. In case you are wondering, running 100 messages has 203 persistence points.
What’s the point then? Well, I could see a need for something like this in a de-batching scenario when the parallel actions will take an unknown account of time to complete and the overall status of all the messages is important.
Download the sample below. I have 4 parallel actions processing messages. I added a random delay to simulate message submission to an outside system or web service. I have a Win Form test harness for easy running. If you want to test the performance, download my single convoy example and remove the delay shapes inside this sample.
The key to this solution is the Synchronized Scope shapes that maintain the overall message count inside the Orchestration.
DOWNLOAD: Parallel Sequential Convoy Sample
See the read me file for set up instructions. Make sure you run “Clean Up” before you rerun and samples.
A better approach? I think it would be better to remove the processing logic inside the Parallel Actions and call an additional Orchestration to do any work. This would increase the overall flexibility and maintenance of the solution.
Take Away: Parallel Convoys allow for better control of your de-batching process but the overall throughput of your messages is decreased.