Hello,
In our project we have several orchestrations that are triggered every minute with the Scheduler Adapter (business requirement is near real-time).
Each of these orchestration must have only 1 instance running at the same time, so we have implemented the singleton pattern. We followed a design like this one: https://fehlberg.wordpress.com/2008/06/06/biztalk-singleton-orchestration-design/
But we end up having suspended orchestrations with the error "The instance completed without consuming all of its messages. The instance and its unconsumed messages have been suspended."
I know it's a risk with this pattern. I thought it would happen only when the instance would run in more than 1 min (because the scheduler adapter is sending a file every minute).
But it happens even with some instances running in about 15sec, so there is something I don't understand, here is an example:
Here we can see that the TransferRegion orchestration started at 10:26:00 (which is expected) and failed.
When I open the orchestration debugger, the time is different, the orchestration is shown starting at 10:26:44 (44 sec later):
And the orchestration ended at 10:27:00:453.
The message not consumed that caused the error has been triggered at 10:27:00.
So I understand that the message arrived just after the listen shape but before the orchestration ends, but I don't understand why the orchestration started 44 sec after is was supposed to ...
Any idea? I'm kind of clueless for now ...