BizTalk: Queue requests to a send port

1.4k views Asked by At

I have a send port going to a web service. At most, I want only 10 requests to be send to the web service at a time. Is this possible to do in biztalk? Hopefully through configuration?

3

There are 3 answers

7
David Hall On BEST ANSWER

There is a post by Richard Seroter that deals with this exact scenario.

You need to set the max connections in the btsntsvc.exe.config file:

<add address = "*" maxconnection = "2" />

Where you filter by IP address and set the maxconnections to what you require.

From the MSDN documentation on the HTTP Adapter it states that the address can be either a URL or an IP, an example config snippet is below:

<configuration>
  <system.net>
    <connectionManagement>
      <add address = "http://www.contoso.com" maxconnection = "5" />
      <add address = "http://www.northwind.com" maxconnection = "2" />
    </connectionManagement>
  </system.net>
</configuration>

You then need to turn on ordered delivery in the send port to ensure that the BizTalk side will not timeout to the limited number of connections.

While this looks like it does exactly what you want, I would also consider some sort of orchestration pattern to manage this, with a controler orchestration that limits the number of child "Send to the service" orchestrations that can run at one time. For me at least that would be a little bit easier to follow without needing external documentation.

0
Pankaj Negi On

If you are using internal site shouldn't need to add following syntax

For example, your Webservice link is http://example.com/ms/sample.aspx add address = "http://example.com" maxconnection = "5"

0
Dijkgraaf On

A few things to consider about David Hall's answer

If you set ordered delivery on your send port you will greatly impact throughput, especially if you have a lot of Orchestrations making multiple calls to the same port as those Orchestrations will be Dehydrating and awaiting for their message to get a turn on the port. It also causes an issue if you have some instances that are request response from a web service and others which are high load and not urgent.

To avoid this we used a BizTalk Orchestration Throttling Pattern which was also from Richard Seroter originally where we are only allowing a certain number of the high volume Orchestrations to spin up at a time, and leaving some connections free for the low latency request/response calls.

Also the maxConnections setting is per Host Instance so you also either have to avoid having multiple send ports to the same server being on different Host Instances or if you have multiple BizTalk servers in a group and can't avoid it you have to set the maxConnections = TargetServermaxConnections / Host Instances