What are Zombies?

Zombie messages are those messages, which are consumed by the BizTalk server yet are not routed to any subscribers. Zombies do not occur for activating receive shape and they occur mostly in convoy patterns. In this article I am going to show how zombies can occur in Parallel Convoys.

I'll not be talking about Parallel Convoy in this post. For details on parallel convoy click here.

First of all below are the conditions in which could create scenarios where Zombies messages occur:
  1. Orchestration instance is running beyond the Receive shape.
  2. Orchestration has stopped execution before the message was delivered to Orchestration.
  3. A message with same correlation set is received more than once (To be demonstrated in this article)
Here's the look of the Orchestration that I have used:

In this Orchestration I have used Parallel convoy which accepts two types of Messages i.e. Customer and Order. I have created a Correlation type CustomerID field present in both the Input schemas.

Following are the Input Customer and Order schema's and also the Output schema and Property schema.



Property Schema

Output Schema

After building, deploying and configuring the project, let's start dropping the messages at Receive location:


CASE 1: A single Customer file(with CustomerID = 1) is dropped and after some time a single Order file(with CustomerID = 1) is dropped
RESULT: Firstly an Orchestration instance fires up and is dehydrated waiting for Order file, after Order file is dropped and Output file is created.

CASE 2: Ten customer files (CustomerID from 1-10) is dropped and after some time ten Order files (CustomerID from 1-10) are dropped.
RESULT: Firstly 10 Orchestration instances are fired up and are dehydrated waiting for Order files. When order files are dropped, Ten output files are created.

CASE 3: Ten Customer files (CustomerID from 1-10) are dropped and after some time a single Customer file (with CustomerID=1) is dropped and after some time Order message (with CustomerID=1) is dropped.
RESULT: Firstly 10 Orchestration instances are fired up, now after dropping again a Customer file with CustomerID=1, no new Instance is fired up. The existing instance with CustomerID=1 consumes this message. Now when I dropped the Order Message with CustomerID = 1 the first message with CustomerID=1 gets completed and the Output file is generated but the second message is not consumed and thus it becomes a Zombie message with following error:


In a Parallel convoy a correlation set can only be initialized only once at a time i.e. subscription should be unique. If we try to initialize correlation set with value already in use BizTalk will create a Zombie message.


The condition demonstrated in this article is only one case in which Zombies can occur in Parallel Convoy. There are other conditions also like a branch of Parallel convoy gets terminated while others are awaiting messages.

Source Code

Sample  code of this project can be found here on Technet Wiki Gallery

See Also

Another important place to find an extensive amount of BizTalk related articles is the TechNet Wiki itself. The best entry point isBizTalk Server Resources on the TechNet Wiki.