Resources for IT Professionals >
Forums Home
>
BizTalk Server Forums
>
BizTalk Server General
>
Error: The instance completed without consuming all of its messages.
Error: The instance completed without consuming all of its messages.
- Hi,
I have following scenario.
I am processing messages in Sequential way. I have two Orchestration, Orch1 has transformation logic and Orch2 has Sequential processing logic. Orch2 is directly binded with MsgBox and receives the messages persisted by the Orch1 based on correlating property.
I need to sort the message based on ReceivedFileName(which is date time stamp). So In the Orch2, I am receiving all the messages within certain delay say 1min, adding to a List, sorting all the messages based on Filename and then sending to destination location one by one.
Now I am getting one error in Orch2 when the frequency is high. The error says "The instance completed without consuming all of its messages. The instance and its unconsumed messages have been suspended. " I believe the cause could be, when the Orch2 sending one batch of sorted messages then it might have received new messages meanwhile. And so, as the sorted messages are sent the Orch2 instance completes but there are new messages still attached to this Orch instance and thus its suspending.
I am totally not able to figure out how can I avoid this error. Also I don't want to terminate the suspended message(loss of message :().
Thanks in advance
Ajeet Kumar- Changed TypeAjeet.Kumar Wednesday, June 17, 2009 9:07 AMI got the solution but looking for better solution.
All Replies
- Looks like the time window you allow the second orchestration to complete is too small for the number of messages being processed. The first orchestration lags behind under heavy load (probably transformation takes more time) and publishes messages when delay timeout on the second expired. Consider increasing this time or using more definitive convoy end condition. For example, if you know the number of messages then use it; or use special termination message passed in when all convoy messages have been received.
http://geekswithblogs.net/paulp/ - Thanks for Reply.
I tried with this also, but the problem is even if I decide any end point for Convoy, then also I can't stop the Orchestration to not to subscribe new messages during its life time. I will explain this in detail
We can separately divide the Orch2(Order Delivery Orch) functionality into 3 parts and considering time lags.
1) Orch2 receives all the convoy msg from MsgBox say it took time t1(equal to the delay)
2) Not it will sort the messages based on FileName...say this operation took time t2
3) Now I am sending the sorted messages one by one to destination location. Say it took time t3 to send all the messages.
Now, if during the time delays (T2+T3) if any new message comes into Convoy orch, then the instance will suspend with the error "The instance completed without consuming all of its messages. The instance and its unconsumed messages have been suspended. ".
So is there any way to make sure that Convoy Orch does not receive any new msg during time T2+T3.
Ajeet Kumar - Looks like i am making it a bit complex, but I didn'g get any alternative way to implement Zombie free Sequential Convoy. I tried using WMI also to get the suspended Order Delivery Instance information and set the correlation property based on that. But client is wary of using WMI. I have few question for WMI, if anyone has any idea pls help.
1) Is there can be any security issue using WMI?
2) Is there can be any performance issue as the production server will be very slow and don't want to add it.
3) How WMI internally queries, I think it uses the Object model of BizTalk Administrative console to get the instance information rather than directly quering the BizTalk DB, not sure though.
4) Is there anyway to achieve the same functionality except using WMI to get the instance information?
Thanks in advance
Ajeet Kumar - I think you may be using the wrong pattern. You will always get zombies, no matter how much you adjust your delays. And having fix up code to overcome the errors is probably not a good idea. An alternative approach to ordering messages based on filename that is not susceptible to errors would be a better approach:
1. Develop a custom file adapter (there is an example in the SDK C:\Program Files\Microsoft BizTalk Server 2006\SDK\Samples\AdaptersDevelopment\File Adapter). This adapter would perform a directory read, order the result and generate messages in the correct order. This approach may not work as it is dependent on how you send the messages.
2. Don't terminate orchestration. Implement two loops. Read convoy messages in a loop for 1 minute, order the result, send the output messages and then loop again.- Unmarked As Answer byAjeet.Kumar Thursday, June 11, 2009 8:26 AM
- Marked As Answer byAndrew_ZhuMSFT, ModeratorThursday, June 11, 2009 1:32 AM
- Thanks for the reply.
I have followed the 2nd approach you mentioned. And to handle Zombie problem I have implemented below, not sure though its best, still looking for better solution.
I have 2 correlation property, as I get any error in Order Delivery Orch, I am updating the value of 1 property, so that it can create new instance of Order Delivery Orch. I know here I am forcing BizTalk to follow this pattern, but my requirement is like that, I have to keep on processing the new messages even if any error occurs in Sequencing Orch.
Also I am getting one error very frequently "The instance completed without consuming all of its messages. The instance and its unconsumed messages have been suspended. ". I am totally out of idea how to handle this error.
Option 1(creating custom Adapter ) looks fascinating, will try once..:)
Ajeet Kumar - Additional question. Are you able to extract the zombies to files somehow. In my scenario I had approx 300 out of 1700 messages turned into zombies. Looking in the group hub(BTS2006 R2) under messages the view is limited to 20 messages. How do I get out all 300 zombie messages as XML files?

