Skip to content

Instantly share code, notes, and snippets.

@kevinmmartins
Created June 24, 2018 23:00
Show Gist options
  • Save kevinmmartins/35fde9d454088514de7a51fe4ed0ea45 to your computer and use it in GitHub Desktop.
Save kevinmmartins/35fde9d454088514de7a51fe4ed0ea45 to your computer and use it in GitHub Desktop.
Camel - Set HTTP Pool
<!-- Create the HTTP pool -->
<bean id="http" class="org.apache.camel.component.http.HttpComponent">
<property name="camelContext" ref="camel" />
<property name="httpConnectionManager" ref="myHttpConnectionManager" />
</bean>
<!-- Create the HTTP pool -->
<bean id="myHttpConnectionManager"
class="org.apache.commons.httpclient.MultiThreadedHttpConnectionManager">
<property name="params" ref="myHttpConnectionManagerParams" />
</bean>
<!-- Create the HTTP pool with property values -->
<bean id="myHttpConnectionManagerParams"
class="org.apache.commons.httpclient.params.HttpConnectionManagerParams">
<property name="defaultMaxConnectionsPerHost" value="${http.default.connections}" />
<property name="maxTotalConnections" value="${http.max.connections}" />
</bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment