Hi This would be expected as the endpoint is dynamic and therefore each endpoint has their own producer.
You should try to use the same endpoint, and if possible if AHC / camel-ahc allows dynamic timeout per request. I am not sure if that is possible / supported. On Mon, Aug 31, 2015 at 11:13 PM, Les Novell <les.nov...@ticketmaster.com> wrote: > Hello, I am creating a simple route to test asynchronous message passing in > Camel. When testing the route by creating 1000 simultaneous connections I > see that around 2000 threads are created to handle requests I'm forwarding > on using AHC component. I am surprised, I thought that Jetty+AHC component > would use non-blocking asynchronous I/O, and a low number of threads. > > Basic Route: > restConfiguration().component("jetty").host("localhost").port(8081); > rest("/ud").get("/wait/{timeout}") > .to("direct:mockEndpoint").bindingMode(RestBindingMode.off); > from("direct:mockEndpoint") > .removeHeaders("CamelHttpPath") > > .toD("ahc:http://localhost:9000/wait/${headers.timeout}?bridgeEndpoint=true"); > > It appears that the AHC component is creating worker threads to manage > outgoing connections to localhost:9000. One for every connection made to > localhost:9090. Am I configuring something wrong, or is this a defect in > AHC? > > Camel version is 2.16-SNAPSHOT > > Thanks, > Les > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Jetty-AHC-route-producing-a-lot-of-threads-tp5771106.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2nd edition: http://www.manning.com/ibsen2