I have talked a lot in the past about Convoys. But, under the covers what really makes Convoy message processing different? What makes a Convoy a Convoy?
To sum it all up into one sentence: Convoys require database level message-to-Orchestration correlation independent of any running Orchestration instances.
Is this confusing? Yes. But trust me, more detailed information is coming soon on this topic. For now, I want to briefly go over the basic internals of how Convoys work in BizTalk Server 2004.
When you deploy an Orchestration:
The presence of a Convoy is detected at the time a BizTalk 2004 Orchestration is enlisted. At this point, an entry is inserted into the ConvoySets table inside the Message Box that lists the properties used in the Convoy Set. This is limited to only three properties because each property is listed in a column inside the table. The subscriptions that can activate this Convoy are marked with the uidConvoySetID for that Convoy Set.
When a message arrives:
Every time a new message arrives into BizTalk it is checked to see if it is part of a Convoy or if it should start a Convoy. If it should start a Convoy, an entry is inserted into the ConvoySetInstances table that routed messages to the correct instance. If it is part of an existing Convoy (i.e. it has the sample Convoy properties of an existing Convoy set), it is routed to the Service Instance listed inside the table. Otherwise, it just follows the normal subscription process.
Convoy Virtual Subscription:
This database level message routing creates a type of virtual subscription on top of the standard subscriptions inside the message box. This is set up internally using a series of tables.
I have put together a simple SQL query to view all Orchestrations that belong to a Convoy and what the Convoy virtual subscription properties are for those instances. I have not tested this code under all Convoy scenarios so please use caution when running the query and it may yield unexpected results. Note that for this viewer to return any data you must have running Orchestration instances that are part of a Convoy.
DOWNLOAD: Sample Convoy Virtual Subscription Viewer
CRITICAL: This application and included SQL will query critical BizTalk SQL Tables. This should not be run on production servers. Review all code prior to execution and use extreme caution when viewing any BizTalk related database tables. Use this code at your own risk.
This sample is also an excellent example of why I am a BizTalk Developer rather then a .net Developer :).
Here are some of my samples that use Convoys that can be used with this viewer.
DOWNLOAD: Concurrent Receive Convoys (post date 11/5/2004)
DOWNLOAD: Sequential Receive Convoys (post date 8/23/2004)