Integrating Integrators – BizTalk, Windows Azure, Windows Workflow, and Beyond
Join
Sign in
Search Options
Search Everything
Search BizTalk Blogs
Home
AppFabric
BizTalk Server
Windows Azure
Windows Workflow
Jobs (Hire A Guru)
More ...
Home
»
BizTalk Server
»
BizTalk Blogs
»
BizTalk Community Blogs via Syndication
»
BizTalk: Sample: Context routing and Throttling with orchestration
BizTalk: Sample: Context routing and Throttling with orchestration
BizTalk Blogs
This group is for blogs related to BizTalk Server. This includes Community Syndicated blogs and Stephen W. Thomas’s blog.
Get this RSS feed
Home
Blogs
Sitewide Application Navigation
Home
Blogs
Media
Forums
Wikis
Groups
Options
Share this
Monthly Archive List
Archives
May 2013
(51)
April 2013
(70)
March 2013
(65)
February 2013
(57)
January 2013
(79)
December 2012
(63)
November 2012
(68)
October 2012
(74)
September 2012
(66)
August 2012
(63)
July 2012
(77)
June 2012
(101)
May 2012
(64)
April 2012
(64)
March 2012
(68)
February 2012
(48)
January 2012
(34)
December 2011
(61)
November 2011
(44)
October 2011
(76)
September 2011
(66)
August 2011
(46)
July 2011
(66)
June 2011
(75)
May 2011
(58)
April 2011
(46)
March 2011
(65)
February 2011
(62)
January 2011
(76)
December 2010
(67)
November 2010
(140)
October 2010
(154)
September 2010
(143)
August 2010
(120)
July 2010
(86)
June 2010
(116)
May 2010
(91)
April 2010
(120)
March 2010
(98)
February 2010
(103)
January 2010
(107)
December 2009
(64)
November 2009
(118)
October 2009
(127)
September 2009
(89)
August 2009
(74)
July 2009
(115)
June 2009
(129)
May 2009
(134)
April 2009
(136)
March 2009
(161)
February 2009
(100)
January 2009
(107)
December 2008
(107)
November 2008
(106)
October 2008
(173)
September 2008
(146)
August 2008
(139)
July 2008
(101)
June 2008
(115)
May 2008
(120)
April 2008
(134)
March 2008
(104)
February 2008
(136)
January 2008
(106)
December 2007
(73)
November 2007
(135)
October 2007
(143)
September 2007
(138)
August 2007
(144)
July 2007
(139)
June 2007
(139)
May 2007
(166)
April 2007
(199)
March 2007
(200)
February 2007
(188)
January 2007
(182)
December 2006
(151)
November 2006
(149)
October 2006
(184)
September 2006
(147)
August 2006
(124)
July 2006
(125)
June 2006
(125)
May 2006
(89)
April 2006
(63)
March 2006
(83)
February 2006
(40)
January 2006
(42)
December 2005
(16)
November 2005
(32)
October 2005
(17)
September 2005
(29)
August 2005
(15)
July 2005
(11)
June 2005
(45)
May 2005
(39)
April 2005
(28)
March 2005
(14)
February 2005
(16)
January 2005
(18)
December 2004
(14)
November 2004
(13)
October 2004
(11)
September 2004
(26)
August 2004
(8)
July 2004
(9)
June 2004
(2)
May 2004
(2)
April 2004
(2)
March 2004
(2)
February 2004
(1)
Tags
.Net
.NET Framework
AppFabric
Architecture
ASP.NET
Azure
BizTalk
BizTalk 2006
BizTalk 2009
BizTalk 2010
BizTalk Server
Cloud
Community News
General
Microsoft
REST
SharePoint
SOA
Tellago
Uncategorized
Visual Studio
WCF
WCF/WF
Web Services
WF
BizTalk Community Blogs via Syndication
Numerous BizTalk Bloggers all in one spot. All content is property of the original blog owner.
RSS for posts
BizTalk: Sample: Context routing and Throttling with orchestration
Rate This
Anonymous
Sun, Feb 27 2011 5:04 PM
Comments
0
The sample demonstrates using orchestration for throttling and using context routing.
Usually throttling is implemented on the host level (in BizTalk 2010 we can also using the host instance level throttling). Here is demonstrated the
throttling with orchestration convoy
that slows down message flow from some customers. Sample implements sort of quality service agreement layer for different kind of customers.
The sample demonstrates the
context routing
between orchestrations. It has several advantages over the content routing. For example, we don’t have to create the property schema and promote properties on the schemas; we don’t have to change the message content to change routing.
Use case:
The BizTalk application has a main processing orchestration that process all input messages. The application usually works as an OLTP application. Input messages came in random order without peaks, typical scenario for the on-line users.
But sometimes the big data batch payloads come. These batches overload processing orchestrations. All processes, activated by on-line users after the payload, come to
the same queue
and are processed only
after
the payload. Result is on-line users can see significant delay in processing. It can be minutes or hours, depending of the batch size.
Requirements:
On-line user’s processing should work without delays. Big batches cannot disturb on-line users. There should be higher priority for the on-line users and the lower priority for the batches.
Design:
Decision is to divide the message flow in two branches, one for on-line users and second for batches. Branch with batches provides messages to the processing line with low priority, and the on-line user’s branch – with high priority.
All messages are provided by hi-speed receive port.
BTS.ReceivePortName context property is used for routing. The
Router
orchestration separates messages sent from on-line users and from the batch messages.
But the Router does not use the BizTalk provided value of this property, the Router set up this value by itself. Router uses the content of the messages to decide if it is from on-line users or from batches.
The message context property the BTS.ReceivePortName is changed respectively, its value works as a recipient address, as the “To” address for the next recipient orchestrations.
Those next orchestrations are the
BatchBottleneck and the MainProcess orchestrations.
Messages with context equal “ToBatch” are filtered up by the
BatchBottleneck
orchestration. It is a unified convoy orchestration and it throttles the message flow, delaying the message delivery to the MainProcess orchestration.
The BatchBottleneck orchestration changes the message context to the “ToProcess” and sends messages one after another with small delay in between. Delay can be configured in the BizTalk config file as:
<appSettings>
<add key="GLD_Tests_TwoWayRouting_BatchBottleneck_DelayMillisec" value="100"/>
</appSettings>
Of course, messages with context equal “ToProcess” are filtered up by the
MainProcess
orchestration.
NOTES:
Filters with string values: In Orchestrations (the first Receive shape in orchestration) use string values WITH quotes; in Send Ports use string values WITHOUT quotes.
Filters on the Send Ports are dynamic; we can change them in run-time. Filters on the Orchestrations are static; we can change them only in design-time.
To check the existence of the promoted property inside orchestration use the Expression shape with construction like this:
if (
BTS.ReceivePortName exists myMessage) { …; }
It is not possible in the Message Assignment shape because using the “if” statement inside Message Assignment is prohibited.
Several predefined context properties can behave in specific way. Say MessageTracking.OriginatingMessage or XMLNORM.DocumentSpecName, they are required some internal rules should be applied to the format or usage of this properties. MessageTracking.* parameters require you have to use tracking and you can get unexpected run-time errors in some cases. My recommendation is - use very limited set of the predefined context properties.
To “attach” the new promoted property to the message, we have to use correlation. The correlation type should include this property. [
Here is a good explanation by Saravana
]
The sample code is here [sorry, temporary trubles with CodePlex].
Read the complete post at
geekswithblogs.net/.../biztalk-sample-context-routing-and-throttling-with-orchestration.aspx
BizTalk
,
- Architecture
,
- Orchestrations