views:

124

answers:

1

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?

+4  A: 

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.

David Hall
Thanks. I've also heard you can create a new biztalk host, associate it to the soap adaptor, and use that host in the send port, and throttle the host via the host configuration. I haven't gotten this to work yet.
Jeremy
Yes - I've heard of that approach too - to me that feels to be the worst of the three though... can't really express why beyond it having a vague 'wrongness' to it. Host throttling is a perfectly valid use of hosts of course, but for a single web service... not so sure.
David Hall
So for the address, can I put something like "http://serverdnsname/webservice.asmx" as the value? is that valid?
Jeremy
I've added more detail to the answert about this - not sure of the exact form you would need to use to specify an asmx, whether you can go that low or if it is at the server name level.
David Hall
I'm not sure why you dislike the host settings option; never used it myself, but can't say it feels wrong to me. The only downside I can think of is the overhead of having an extra host for that reason alone, but that comes down to how busy it gets.(not that I disagree with the connection management route either, hence just a comment)
Yossi Dahan
Hi Yossi, I suppose my main dislike of using the host settings method comes down to it being a big hammer to use to solve a problem for a single web service. The scope of a host just feels bigger to me than that of an adapter. So nothing solid, just a feeling... perhaps it is just that the use of a host implies something more at a solution design level.
David Hall