Hi It looks like setDefaultMaxPerRoute is invoked later that changes this value. Also you should not use query parameter as the http client may be already created if you use http component elsewhere, favour set the value on the component level
On Fri, Jan 20, 2023 at 11:18 AM Rohan Emmanuel <rohan.emmanue...@gmail.com> wrote: > hi, > In my camel route i am using http component to connect to a HTTP service, I > have the connectionsPerRoute query parameters set on the url as per the > documentation. but I see that always 2 connections are established to the > HTTP service even though I am sending many concurrent requests to the > route. > > I added a couple of print statements to get pool stats for every > connect() call, I always see 2 connections getting established, I also > verified there is always 2 number of connections in the ESTABLISHED state > on the HTTP service side. > > PoolStats-->[total kept alive: 0; route allocated: 2 of 2; total allocated: > 2 of 20] > > > in the PoolingHttpClientConnectionManager code, I see that the CPool is > initialized with defaultMaxPerRoute as 2. > > > this.pool = new CPool((ConnFactory)new > InternalConnectionFactory(this.configData, connFactory), 2, 20, > timeToLive, timeUnit); > > > Shouldnt this be overridden with the connectionsPerRoute value? is > there any way to configure thie connections Per route configuration? > > any help would be appreciated. > > > -- > Regards, > Rohan Emmanuel > -- Claus Ibsen ----------------- @davsclaus Camel in Action 2: https://www.manning.com/ibsen2