Anyone who has done anything with BizTalk has run into the “could not find a matching subscription error” at one time or another.  Keep in mind that under the covers, BizTalk operates under a Publish/Subscibe architecture.  What this message is telling us is that nothing has subscribed to our message with it’s current properties (namespace, root element, port, etc).  This is where the BTSSubscriptionViewer comes in.

This handy little, often forgot about tool can be found buried deep within the /Program Files/Microsoft BizTalk Server 2004/SDK/Utilities directory.  Once you launch the tool, select Load under the Main menu to load all the current subscriptions (remember, subscriptions can constantly change due to Convoy patterns, dehydrated orchestrations, etc).

The top of the window will display the current subscriptions, and bottom pane will display detailed information about the specific subscription.  So, how is this going to help us?  Well, if you find your orchestration in the top pane, chances are there is an issue with the subscriptions information.  For instance, perhaps your message has the wrong namespace, or root node, so it doesn’t match the subscription in the format of http://YourNameSpace#MessageType .  Keep this in mind when dealing with Multi-part messages.  I have seen people have the parts reversed, so when the subscription is created the body of the message type is pointing to the wrong body part.  Also, if you are using Correlation, this will be helpful to see what the correlation value has been set to (don’t forget to set your follow correlation set!!!).

So, remember, when your subscriptions are not found, launch the BTSSubscriptionViewer tool to find out what’s going on under the covers.