Partner direct bound ports

Working with Direct Bound Ports in Orchestrations: Partner direct bound ports

Published on : Jul 10, 2023

Category : BizTalk Server

Sandro

Author

Direct bound ports are logical one-way or two-way ports that you can use inside your orchestration that are not explicitly bound to physical ports. This will allow you to have different communication patterns among your services.  

There are three types of direct bound ports that you can choose as the Partner Orchestration Port:

Today we are going to talk about Partner direct bound ports.

Partner direct bound ports

Partner direct bound ports provide for inter-orchestration communication via Logical Ports.  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.

Partner direct bound ports

You can create two communication patterns:

  • Forward partner orchestration direct binding
  • Inverse partner orchestration direct binding

These two patterns provide explicit inter-orchestration communication, meaning there is an intended recipient orchestration when using forward partner orchestration direct binding and an intended sender orchestration when using inverse partner orchestration direct binding.

Forward Partner Orchestration Direct Binding

This is the typical communication pattern used for partner orchestration direct binding. This type of forward partner orchestration binding allows you to have multiple senders bound to the same recipient.

Forward Partner Orchestration Direct Binding

What this pattern implements is:

  • On the sender’s side, it says, I will send messages to orchestrationReceiverName.receivePort.
  • On the receiver’s side, it says, I will receive any messages sent directly to my receivePort

One crucial thing to understand in this pattern is that there is a strong bind from the sender orchestration to the receiver orchestration.  By strong bind, I mean that the sender orchestration is referencing the receiver’s strong name as its partner service.  This means that if you want to make some types of changes on the receiver’s side, sometimes you must also update the design time configuration of the sender’s port.  But the receiver has no explicit knowledge of the sender, so the senders’ orchestrations can be updated without affecting the receiver.

This type of forward binding allows you to have multiple senders bound to the same recipient. 

To configure forward partner orchestration direct binding, do the following:

  • In ReceiverParnerOrch, select the Port shape in the orchestration Toolbox. This starts the Port Configuration Wizard.

  • On the Port Properties page, in the Name field, type ReceivePartnerRoutedPort. Click Next.

 configuring forward partner orchestration direct binding -step 1

  • On the Select a Port Type page, select Create a new Port Type. In the Port Type Name field, type ReceivePartnerRoutedPortType. Click Next.

configuring forward partner orchestration direct binding -step 2

  • On the Port Binding page, in the Port direction of communication drop-down list, select I’ll always be receiving messages on this port. In the Port binding drop-down list, select Direct.

  • Select To receive messages from other orchestrations, select this port here and in those orchestrations, and then in the Port on partner orchestration drop-down list, select ReceiverParnerOrch.ReceivePartnerRoutedPort. Click Next.

configuring forward partner orchestration direct binding -step 3

  • On the Completing the Port Wizard page, click Finish.

  • In SenderPartnerOrch, select the Port shape in the orchestration Toolbox. This starts the Port Configuration Wizard.

  • On the Port Properties page, in the Name field, type SendPartnerPort. Click Next.

configuring forward partner orchestration direct binding -step 4

  • On the Select a Port Type page, select Use an existing Port Type. Under Available Port Types, select ReceivePartnerRoutedPortType, and then click Next.

configuring forward partner orchestration direct binding -step 5

  • On the Port Binding page, in the Port direction of communication drop-down list, select I’ll always be sending messages on this port. In the Port binding drop-down list, select Direct.

  • Select To send messages to other orchestrations, select this port here and in those orchestrations, and then in the Port on partner orchestration drop-down list, select ReceiverParnerOrch.ReceivePartnerRoutedPort. Click Next.

configuring forward partner orchestration direct binding -step 6

  • On the Completing the Port Wizard page, click Finish.

Inverse Partner Orchestration Direct Binding

This is not the typical communication pattern used for partner orchestration direct binding. In this pattern, the direction of binding is the reverse of the direction of communication. This type of inverse partner orchestration binding allows you to have a single sender communicate with multiple receivers.

Inverse Partner Orchestration Direct Binding

What this pattern implements is:

  • On the sender’s side, it says, I will send a message to anyone listening for messages from my send port.
  • And on the receiver’s side, it says, I will receive messages sent from orchestrationSenderName.sendPort

In this case, the receiver is strongly bound to the sender, implying that if you want to make some types of changes to the sender’s orchestration, then you must update the receive port configuration.  The sender has no explicit knowledge of the receiver, so the receivers’ orchestrations can be updated without affecting the sender.

To configure inverse partner orchestration direct binding, do the following:

  • In SenderPartnerOrch, select the Port shape in the orchestration Toolbox. This starts the Port Configuration Wizard.

  • On the Port Properties page, in the Name field, type SendPartnerPort. Click Next.

  • On the Select a Port Type page, select Create a new Port Type. In the Port Type Name field, type SendPartnerPortType. Click Next.

  • On the Port Binding page, in the Port direction of communication drop-down list, select I’ll always be sending messages on this port. In the Port binding drop-down list, select Direct.

  • Select To send messages to other orchestrations, select this port here and in those orchestrations, and then in the Port on partner orchestration drop-down list, select SenderPartnerOrch.SendPartnerPortType. Click Next.

  • On the Completing the Port Wizard page, click Finish.

  • In ReceiverPartnerOrch, select the Port shape in the orchestration Toolbox. This starts the Port Configuration Wizard.

  • On the Port Properties page, in the Name field, enter ReceivePartnerRoutedPort. Click Next.

  • On the Select a Port Type page, select Use an existing Port Type. Under Available Port Types, select SendPartnerPortType, and then click Next.

  • On the Port Binding page, in the Port direction of communication drop-down list, select I’ll always be receiving messages on this port. In the Port binding drop-down list, select Direct.

  • Select To receive messages from other orchestrations, select this port here and in those orchestrations, and then in the Port on partner orchestration drop-down list, select SenderPartnerOrch.SendPartnerPortType. Click Next.

  • On the Completing the Port Wizard page, click Finish.

A commonly misunderstood aspect of Partner direct bound ports is its interaction with the Message Box, with some incorrectly thinking that there is direct communication with another instance of orchestration without traversing the BizTalk Server Message Box Database.  This is not the case! Any message sent through any type of logical port always travels through the Message Box. 

Inverse Partner Orchestration Direct Binding

You can find a sample solution of Partner direct bound ports on my GitHub here:

Check out BizTalk360! To know more about the BizTalk360 features, try out free trial or book a demo.