Search code examples
singletonbiztalkbiztalk-orchestrations

BizTalk Singleton - repeats consumed messages?


I tried a singleton in BizTalk and that seems to work so far. However, this does lead to an incident that I cannot really explain.

The instance is now running for about half a day and it seems that some messages are repeated over and over again. What makes me wonder is the time span between the messages, which is almost exactly 30 minutes.

I use the BizTalk out of the box file adapter for it, in which I dropped in a handful of files at 12:10. As you can see from the SQL query(attachment), these files were repeated every half hour. Regarding to this problem the Orchestration works as expected.

Have I forgotten an essential part of the Singleton concept? Do I have to delete processed messages? If you have an idea what it could be, please give me a hint.

Attached is a picture of the orchestration and an evaluation of the staging table.

StagingTable eval: https://owncloud.kurdy.de/index.php/s/FNMKeF9JJY6BZiy

https://owncloud.kurdy.de/index.php/s/6E7BH0Q8mqWVaoP


Solution

  • What you are missing is a listen shape which in one branch contains your ReceiveFollower and the other branch that contains a configured delay, and also possibly a shape that sets the Exit Loop condition unless you want your singleton to go on forever.

    Singleton Orchestration

    You do have to be careful with Zombies this sort of singleton. Zombies occurs if the Orchestration has just hit the delay and is in the process of tearing itself down when you get another message that matches the subscription. Then you will get the following sort of error

    0xC0C01B4C The instance completed without consuming all of its messages. The instance and its unconsumed messages have been suspended.