This solution is a very simple Dynamic Broker message but uses a lot of interesting BizTalk Server aspects.
You can extend this idea for more complex BizTalk Server dynamic brokering solution.
In order to resolve this problem I used only BizTalk artifacts, in this case I have thought to use BRE, Business Rule Engine, that I consider to be the more interesting part to use to create a BizTalk solution based on dynamic rules.
How it works.
This example offers the possibility to send any type of information, from any type of source, simply defining the entity source and its rules of shipment dynamically.
The message is received by the receive location, this BizTalk port uses a pipeline of pass-through in order receiving any type of information, this pipeline set a property named DESTINATION, this property defines the name of the policy that will set up all the parameters of shipment.
In order to promote the property I have used the custom pipeline component named PropertyPromotionComponent, you can download this component in Codeplex to this address, if you prefer you can develop your own component
In this case the rule is always true but we can extend as we prefer and this rule set the value of BaseTypeAddress field with the destination path.
I have created an orchestration that receives the messages and it takes care to set up the properties of the dynamic port, clearly we can use the same principle to change al behaviors of our process in the orchestration.
The important aspect is to call the BRE Policy dynamically, in this way we will be totally open to extend the solution.
The rule pass the message used by the orchestration to set all of its behaviors and artifact, in this case only the dynamic port.
This example is very simple but it present the idea to create a dynamic brokering message system using a pure BizTalk Server solution.
You can use this sample and extend the idea for any type of BizTalk dynamic solutions.
You can download the sample here.