...
If you need more control over the http producer you should use the HttpComponent where you can set various classes to give you custom behavior.
Setting MaxConnectionsPerHost
The Http Component have a org.apache.commons.httpclient.HttpConnectionManager
where you can configure various global configuration for the given component.
By global, we mean, that any endpoint the component creates has the same shared HttpConnectionManager. So if we want to set a different value for the max connection per host, we need to define on the http component and not on the endpoint URI that we usually uses. So here comes:
First we define the http component in spring XML. Yes we can use the same scheme name http that Camel otherwise will auto discover and create the component with default settings. What we need is to overrule this so we can set our options. In the sample below we set the max connection to 5 instead of the default of 2.
TODO: snippet
And then we can just use it as we normally do in our routes:
TOOD: snippet 2
Include Page | ||||
---|---|---|---|---|
|
...