Direct Bound Ports


In BizTalk Server 2004/2006 orchestrations can have direct bound ports. 


Direct bound ports are logical one-way or two-way ports in your orchestration that are not explicitly bound to physical ports that allow you to have different communication patterns amongst your services.  To create a direct bound port select the binding of the logical port to be direct then choose as the ’Partner Orchestration Port’ what this port will be bound to.


 


There are three types of direct bound ports that you can choose as the Partner Orchestration Port; message box, partner, and self-correlating.


 


Message box direct bound ports allows for publish-subscribe design patterns.  Messages sent on a message box direct bound port are published to the message box without any explicit intent of the message recipients.  Logical receive ports configured as message box direct bound ports get messages directly from the message box whose subscriptions are based only on message type and filter expression (for activating receive shapes) or correlation set (for non-activating receive shapes).


 



Figure 1 Message Box Direct Bound Ports


 


Partner direct bound ports provide for inter-orchestration communication.  Messages sent on a direct bound port can be sent to an intended recipient orchestration and messages received on a partner direct bound port can be received from an intended sender orchestration.


 



Figure 2 Partner Direct Bound Ports


 


Self-correlating direct bound ports assists you in designing asynchronous inter-orchestration communication.  Messages sent to a self-correlating direct bound port are routed to the instance of the orchestration that created the receiving end of the self-correlated direct bound port.


 



Figure 3 Self-Correlating Direct Bound Ports


 


A commonly misunderstood aspect of direct bound ports is its interaction with the message box with some incorrectly thinking that there is direct communication with another instance of an orchestration without traversing the message box.  This is not the case; any message sent through any type of logical port always travels through the message box. 


 



Figure 4 All logical ports communicate through the message box


 


Direct bound ports are only logical ports and therefore only a design time configuration feature.  An administrator cannot bind a direct bound port to a physical port nor change the partner it is currently configured for.


To see each of these different types of ports in action and in context you can look at the Business Process Management (BPM) scenario that ships as part of the SDK in BizTalk Server 2006.


I will have a separate posting and go into more detail on each type of direct bound port.