Biztalk Direct Binding Messaging error
A few months ago I worked on a medium-size Biztalk project. I’ll depict in a few words the big picture of the application architecture in order to understand the context. The application backend was based entirely on Biztalk. The reason was all the Biztalk “poetry”: reliability, scalability, availability, asynchronous processing… the rich customer ready to pay for a Biztalk solution. The backend was designed to have two layers: one that exposes common and granular services specific to the business domain, the other one was thought to be specific to the applications that will consume the services. The services layer has an orchestration for each service it exposes.
The communication between the two layers was implemented with the Direct Binding mechanism to have a low coupling between layers. So the application specific layer is publishing a message into the MessageBox and the services layer consumes the message basing on its orchestrations subscriptions. The response path was designed in the same way.
The other thing that should be mentioned is that our team was involved only in the development of the services layer.
We deployed the application in the production environment and after a while we started to receive from time to time the following strange and meaningless error in the event viewer:
Event Type: Error
Event Source: XLANG/s
Event Category: None
Event ID: 10008
Date: 27/10/2007
Time: 04:33:29
User: N/A
Computer: Computer
Description:
Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘ServiceLayer.Service1(92cac9e7-dbe2-d8dd-515b-6805d86d001d)’.
The service instance will remain suspended until administratively resumed or terminated.
If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: 5789b48b-6297-452f-8b41-ff9a6b1090ec
Shape name: Send Service1Msg
ShapeId: 82d935e6-6c3d-4f4e-86e0-1c8ddb679ea3
Exception thrown from: segment 1, progress 59
Inner exception: Exception occurred when persisting state to the database.
Exception type: PersistenceException
Source: Microsoft.XLANGs.BizTalk.Engine
Target Site: Void Commit()
The following is a stack trace that identifies the location where the exception occured
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.Commit()
at Microsoft.XLANGs.Core.Service.Persist(Boolean dehydrate, Context ctx, Boolean idleRequired, Boolean finalPersist, Boolean bypassCommit, Boolean terminate)
at Microsoft.XLANGs.Core.LongRunningTransaction.PendingCommit(Boolean ignore, XMessage msg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.SendMessage(Int32 iOperation, XLANGMessage msg, Correlation[] initCorrelations, Correlation[] followCorrelations, Context cxt, Segment seg, ActivityFlags flags)
at ServiceLayer.Service1.segment1(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
Additional error information:
A batch item failed persistence Item-ID d3057a06-4e67-45b8-99ce-4c2b4e3c79ac OperationType MAIO_CommitBatch Status -1061151998 ErrorInfo The published message could not be routed because no subscribers were found. .
Exception type: PersistenceItemException
Additional error information:
Failed to publish (send) a message in the batch. This is usually because there is no one expecting to receive this message. The error was The published message could not be routed because no subscribers were found. with status -1061151998.
Exception type: PublishMessageException
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
After some investigation we observed that the issue is manifesting under high load of the services layer. In that scenario the service response time increased considerable so we decided to ask the guys that implemented the specific application layer how they deal with such a scenario. We found out that they had implemented a timeout mechanism that signal the front-end application about the timeout and terminate the orchestration.
It was clear for us that the problem has something to do with the Direct Binding and with the fact that the consumer orchestration is closed before receiving its response. The service orchestration publishes a message that doesn’t have any subscriber because the consumer orchestration is terminated meanwhile.
In order to reproduce this behavior we created a test application with two orchestrations: a consumer orchestration and a service orchestration. The consumer application publishes a message and waits for the response for a given time… if the time expires it will terminate. The service orchestration has some delay activity that will let enough time to the consumer to terminate before sending the response. The same error is received with the test application.
In conclusion, you should pay attention and not terminate the consumer orchestrations that are involved into Direct Binding communication pattern before receiving the response, otherwise the administration work will become interesting or the application will remain in an inconsistent state.


I am not really sure if best practices have emerged around things like that, but I am sure that your great job is clearly identified. I was wondering if you offer any subscription to your RSS feeds as I would be very interested.
I feel a lot more people need to read this, very good info! . . . . . .
Excellent post. I want to thank you for this informative read, I really appreciate sharing this great post. Keep up your work. . . .
Thanks For This Blog, was added to my bookmarks.
I was just browsing for relevant blog posts for my project research and I happened to stumble upon yours. Thanks for the excellent information!
You certainly deserve a round of applause for your post and more specifically, your blog in general. Very high quality material.
That is some inspirational stuff. Never knew that opinions could be this varied. Thanks for all the enthusiasm to offer such helpful information here.
Hey, great blog, but I don’t understand how to add your site in my rss reader. Can you Help me please?
I thought it was going to be some boring old post, but it really compensated for my time. I will post a link to this page on my blog. I am sure my visitors will find that very useful.
Infrequent we can find cool theme for wpress. There are enough cool themes, but very limited in settings. I installed recent versions of Designora, Press 88, Red Steel, DesignPile, also I have installed also ProSense – simple, but optimized for adsense. Very rarely we can see something cool but good in settings.
Hrmm that was weird, my comment got eaten. Anyway I wanted to say that it’s nice to know that someone else also mentioned this as I had trouble finding the same info elsewhere. This was the first place that told me the answer. Thanks.
Sanity is a madness put to good uses. George Santayana (1863-1952)
This is a great article thanks for sharing this informative information.. I will visit your blog regularly for some latest post.
I must say, I thought this was a pretty interesting read when it comes to this topic. Liked the material. . . . .
Advantageously, the article is actually the greatest topic on curing acne naturally. I concur with your conclusions and will eagerly look forward to your coming updates. Saying thanks will not just be enough, for the phenomenal lucidity in your writing. I will immediately grab your rss feed to stay informed of any updates.
I do agree with all the ideas you have presented in your post. They are very convincing and will definitely work. Thanks for the post.
Thanks for taking the time to discuss this, I feel strongly about it and love reading more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.
This is a good step to save paper. And will save the rain forests in Indonesia. Moreover, this will reduce the burden on the back of elementary school students. Of course this will make the traditional printing companies and governments in the third world into a panic because of their unpreparedness of information technology. . .
I accept you but it definitely seeing guide lots of people.
What a good blog you have here. Please update it more often. This topics is my interest. Thank you. . .
I agree with the author that we need to share the knowledge we gain!. . . . . .
Good topic for making an effective dissertation. . . . . .
I have some trouble to subscribe the rss feed, anyway I’ve bookmarked this site, is very useful and full of informations.
Hey – great blog, just looking around some blogs, seems a really nice platform you are using. I’m currently using Wordpress for a few of my blogs but looking to change one of them over to a platform similar to yours as a trial run. Anything in particular you would recommend about it?
That is some inspirational stuff. Never knew that opinions could be this varied. Thanks for all the enthusiasm to offer such helpful information here.
Hey – nice blog, just looking around some blogs, seems a pretty nice platform you are using. I’m currently using Wordpress for a few of my sites but looking to change one of them over to a platform similar to yours as a trial run. Anything in particular you would recommend about it?
Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.
I thought it was going to be some boring old post, but it really compensated for my time. I will post a link to this page on my blog. I am sure my visitors will find that very useful.
Your feeds are fed into other blogger’s RSS feeders, making it syndicated or putting in another way, people out there will subscribe to them and receive online copies of your text.
Cool post! How much stuff did you have to look up in order to write this one? I can tell you put some work in.
Very Interesting Post! Thank You For Thi Information!
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.
I recently decided to produce a short movie about this, I would be appreciative if you would maybe take a second to check it and perhaps leave a comment about what you think, I left the movie url in the “website” field, hopefully you can access it, I appreciate it greatly
Finding websites with as much information as this one is always a pleasure I wll be sure to come back and visit again real soon, keep up the good work.
I’ve been visiting your blog for a while now and I always find a gem in your new posts. Thanks for sharing.
Very informative post. Thanks for taking the time to share your view with us.
Hey, maybe this is a bit offf topic but in any case, I have been surfing about your blog and it looks really neat. impassioned about your writing. I am creating a new blog and hard-pressed to make it appear great, and supply excellent articles. I have discovered a lot on your site and I look forward to additional updates and will be back.
Have you ever considered adding more videos to your blog posts to keep the readers more entertained? I mean I just read through the entire article of yours and it was quite good but since I’m more of a visual learner,I found that to be more helpful well let me know how it turns out! I love what you guys are always up too. Such clever work and reporting! Keep up the great works guys I’ve added you guys to my blogroll. This is a great article thanks for sharing this informative information.. I will visit your blog regularly for some latest post.
Finding websites with as much information as this one is always a pleasure I wll be sure to come back and visit again real soon, keep up the good work.
I agree with you. This type of projects should be encouraged and I think that these type of projects are the projects for the future. . . . .
Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates.
I have been visiting variousblogs for my dissertation study. I have found your blog to be fairlybeneficial. Keep updating your blog with usefulinformation… Regards
Wow, very interesting article. It’s funny how history can be twisted in so many different ways. These photos certainly give us clues, but I guess we’ll never know the true story. . . .
Its very informative and interesting article.all the points are very useful. Simple but very effective writing. Thanks for sharing such a nice post.
Not often we can see good theme for wordpress. There are enough nice themes, but sometimes inconvenient in settings. I tried last versions of Designora, Businezz, Red Steel, Traction, also I have installed also Heatmap – simple, but optimized for adsense. Very rarely we can find something convenient but rich in settings.
I really love going back to your site to read your story and see more pictures that are really taken with great care. . . . . .
Excellent post I must say.. Simple but yet interesting and engaging.. Keep up the awesome work!
Awesome Post. I add this Blog to my bookmarks.
Yea. I enjoy the column written in this place. A partner told me about your site, ever since my first visit, I have been hooked. Don’t consume your life in doubts and despair, just order students buy term paper. Keep the articles arriving!
Hey – nice blog, just looking around some blogs, seems a pretty nice platform you are using. I’m currently using Wordpress for a few of my sites but looking to change one of them over to a platform similar to yours as a trial run. Anything in particular you would recommend about it?