]> BizTalk filter subscriptions 🌐:aligrant.com

BizTalk filter subscriptions

Alastair Grant | Thu 2 May 2013

I think I've encountered this before, but as it was causing me a bit of pain I figured I'd reinvestigate it and make a note.

I changed the filter expression on an activating receive shape in a BizTalk orchestration and redeployed my application - it didn't work. Not because the filter was wrong, but because it hadn't updated the subscription in BizTalk.

You can view the activation subscriptions through the BTS Administration tool - mine showed the previous expression I had used. No amount of rebuilding, redeploying or rebooting would solve the issue.

Subscriptions are stored in the BizTalkMsgBoxDb database (not the management one as you might think). The relevant tables are dbo.Subscription and dbo.EqualPredicates. The latter showed both the old and new expression filters I had used on my receive shape. Although for some reason, only the old one was being used.

If you unbind an Orchestration from a host, then the relating subscriptions are removed from the Subscription table. If you delete the application from the server, strangely, the predicates remain in the EqualPredicates table. Could this mean you get a stack of stuff building up there? Well, no, as with most things that could potentially get out of hand in BizTalk, there is a job to purge old data. PurgeSubscriptionsJob_BizTalkMsgBoxDb in this case. This runs every minute constantly and keeps things clean. If though you just knacker the redeploy button there is no chance for these to become stale and clear out.

So, if you change your expression filter the process is to unenlist and unbind the orchestrations (do the whole app for sure I'd say) and then wait a minute, or run the job manually to clear out the old subscription predicates.

Breaking from the voyeuristic norms of the Internet, any comments can be made in private by contacting me.

Related