Presentation is loading. Please wait.

Presentation is loading. Please wait.

Module 15: Implementing Messaging Patterns. Overview Lesson 1: Creating Adaptable Orchestration Ports Lesson 2: Receiving Multiple Related Messages.

Similar presentations


Presentation on theme: "Module 15: Implementing Messaging Patterns. Overview Lesson 1: Creating Adaptable Orchestration Ports Lesson 2: Receiving Multiple Related Messages."— Presentation transcript:

1 Module 15: Implementing Messaging Patterns

2 Overview Lesson 1: Creating Adaptable Orchestration Ports Lesson 2: Receiving Multiple Related Messages

3 Lesson 1: Creating Adaptable Orchestration Ports Configuring Port Properties at Runtime Communicating between Orchestrations Assigning Ports to Trading Partners Demonstration: Configuring Dynamic Ports Dynamic Binding Options

4 Configuring Port Properties at Runtime Dynamic Binding Orchestration code sets the port address at runtime Address includes prefix which indicates the adapter and address (e.g. FTP://somehost:21/drop) Orchestration code sets the port address at runtime Address includes prefix which indicates the adapter and address (e.g. FTP://somehost:21/drop) Other information can be dynamically set in the context User name and password Configuration data for pipeline components All properties depend on the adapter being used Other information can be dynamically set in the context User name and password Configuration data for pipeline components All properties depend on the adapter being used

5 Direct Binding Options and Benefits Communicating between Orchestrations Option 1: MessageBox Orchestration is bound to the MessageBox instead of bound to ports Provides for loosely coupling orchstrations and systems Option 1: MessageBox Orchestration is bound to the MessageBox instead of bound to ports Provides for loosely coupling orchstrations and systems Option 2: Self Correlating Relies on a shared port instance Useful for receiving messages back from a related process Option 2: Self Correlating Relies on a shared port instance Useful for receiving messages back from a related process Option 3: Shared Port Allows for starting a partner orchestration with a message Option 3: Shared Port Allows for starting a partner orchestration with a message Provides a means to pass messages between orchestrations Three options for implementation Provides a means to pass messages between orchestrations Three options for implementation

6 Direct Binding with the Message Box MessageBox Sending Orchestration Receiving Orchestration Direct bound receiver creates subscriptions based on filters 1 1 Direct bound send is published in the message box and routed 2 2 Orchestration is bound to MessageBox instead of to ports Use correlation and message context properties No subscribers results in an exception in the orchestration Offers the benefits of loosely coupled design Use correlation and message context properties No subscribers results in an exception in the orchestration Offers the benefits of loosely coupled design

7 Direct Binding with Self Correlation Sending Orchestration Receiving Orchestration Port Caller passes an instance of a port into another orchestration 1 1 Orchestration responds by sending messages to the port instance 2 2 Ports rely on a shared instance Useful for receiving messages back from a related process Can be used to send more data/messages to running process BizTalk infrastructure handles the correlation with token Useful for receiving messages back from a related process Can be used to send more data/messages to running process BizTalk infrastructure handles the correlation with token Port

8 Direct Binding with Shared Ports Ordering Orchestration Shipping Port Shipping Orchestration Allows for starting partner orchestration with a message Similar to the Start Orchestration shape Use single port type and define port in each orchestration Use the same port to define the binding in both orchestrations Reference can be from sender to receiver or vice versa Similar to the Start Orchestration shape Use single port type and define port in each orchestration Use the same port to define the binding in both orchestrations Reference can be from sender to receiver or vice versa

9 ?? Shipper SpeedyExpress Port Assigning Ports to Trading Partners PartnerSendPort FedShip Ship_FederalShipping SpeedEx Ship_SpeedyExpress UnitedPkg Ship_UnitedPackage Ordering Orchestration ShipperRole Set party on role link 1 1 Look up party 2 2 Send the message 4 4 Role Links Define a process that can apply to multiple partners or services Contain send and receive port types Must specify the role link type and role (provider or consumer) Define a process that can apply to multiple partners or services Contain send and receive port types Must specify the role link type and role (provider or consumer) Get party bound port 3 3

10 Choosing Partners for Role Links Party identifiers or aliases are used to determine the partner Send Ports Set the DestinationParty property on the role link in orchestration Send Ports Set the DestinationParty property on the role link in orchestration Receive Ports Party identification handled in the receive pipeline Any receive port can be used by any partner or application Requires that the receiving host is Authentication Trusted Receive Ports Party identification handled in the receive pipeline Any receive port can be used by any partner or application Requires that the receiving host is Authentication Trusted TradingPartnerRoleLink(Microsoft.XLANGs.DestinationParty) = new Microsoft.XLANGs.BaseTypes.Party(“keyvalue”, “qualifier”); TradingPartnerRoleLink(Microsoft.XLANGs.DestinationParty) = new Microsoft.XLANGs.BaseTypes.Party(“keyvalue”, “qualifier”);

11 Dynamic Binding Options Dynamic Addressing You will set the address and/or transport dynamically at runtime Dynamic Addressing You will set the address and/or transport dynamically at runtime MessageBox You want the loose coupling of publish and subscribe MessageBox You want the loose coupling of publish and subscribe Role Links You are creating a reusable process used with several “partners” You can define the parties and configure identifiers for them You can determine at runtime the current “partner” in the process Role Links You are creating a reusable process used with several “partners” You can define the parties and configure identifiers for them You can determine at runtime the current “partner” in the process Self Correlating Ports You don’t have a common property to correlate on You are calling the orchestration and can pass the port as a param Self Correlating Ports You don’t have a common property to correlate on You are calling the orchestration and can pass the port as a param Shared Ports You want to subscribe to messages from an orchestration Shared Ports You want to subscribe to messages from an orchestration

12 Demonstration: Configuring Dynamic Ports In this demonstration, you will see how to: Configure a Port using Dynamic Binding Configure a Role Link

13 Lesson 2: Receiving Multiple Related Messages How Correlation Works Orchestration Subscriptions Convoy Messaging Patterns Sequential Convoys Parallel Convoys Demonstration: Implementing Convoy Patterns

14 How Correlation Works MessageBox Orchestration Instance Send Rcv Orchestration Instance Rcv Send Property NameValue OrderID7 Property NameValue OrderID5 OrderID = 5 OrderID = 7

15 Orchestration Subscriptions Types of Orchestration Subscriptions Activation Subscriptions New instance of the orchestration is created when a message is received Subscription created when an orchestration is enlisted Activation Subscriptions New instance of the orchestration is created when a message is received Subscription created when an orchestration is enlisted Instance Subscriptions Includes receives in called orchestrations Created at runtime when a correlation set is initialized Includes an instance ID for the current orchestration instance New messages routed to the existing orchestration instance Instance Subscriptions Includes receives in called orchestrations Created at runtime when a correlation set is initialized Includes an instance ID for the current orchestration instance New messages routed to the existing orchestration instance Activation Subscriptions are created for activating receive shapes Instance Subscriptions are created for receive shapes that are following a correlation set Activation Subscriptions are created for activating receive shapes Instance Subscriptions are created for receive shapes that are following a correlation set

16 Convoy Messaging Patterns Special Types of Messaging Patterns Using Correlation Convoys are used to address race conditions in messaging Convoys setup instance subscriptions At routing, convoy information is used to correlate messages Two types: Sequential and Parallel Convoys are used to address race conditions in messaging Convoys setup instance subscriptions At routing, convoy information is used to correlate messages Two types: Sequential and Parallel

17 Sequential Convoys Used When Related Messages Are Received in a Series Uniform Sequential Convoy All messages are of the same type Uniform Sequential Convoy All messages are of the same type Non-Uniform Sequential Convoy Involve different message types Non-Uniform Sequential Convoy Involve different message types Process messages in a loop until known stop condition Messages must be received from the same port Process messages in a loop until known stop condition Messages must be received from the same port

18 Implementing Sequential Convoys Determine how many messages to process 3 3 Initialize correlation set 1 1 Follow correlation set 2 2

19 Parallel Convoys Used When Related Messages Arrive in an Unknown Order Any message can be received first Must know at design time how many messages are coming Messages can be received from multiple ports Messages may be of different types The Parallel Actions shape is designed to implement parallel convoys Processing continues once all the messages have arrived Any message can be received first Must know at design time how many messages are coming Messages can be received from multiple ports Messages may be of different types The Parallel Actions shape is designed to implement parallel convoys Processing continues once all the messages have arrived

20 Implementing Parallel Convoys Activate = true for each Receive shape within the Parallel Action shape Initialize correlation set 1 1 Initialize SAME correlation set 2 2 Process continues after all messages are received 3 3

21 Demonstration: Implementing Convoy Patterns In this demonstration, you will see how to: Create a Non-Uniform Sequential Convoy Create a Parallel Convoy

22 Lab: Implementing Dynamic Messaging Patterns Exercise 1:Using Correlation Exercise 2:Using Role Links Exercise 3:Defining Parties Exercise 4:Using Direct Messaging Ports


Download ppt "Module 15: Implementing Messaging Patterns. Overview Lesson 1: Creating Adaptable Orchestration Ports Lesson 2: Receiving Multiple Related Messages."

Similar presentations


Ads by Google