camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elvio Caruana (ecaruana)" <>
Subject camel-ahc issue
Date Fri, 30 Jan 2015 14:10:04 GMT

I think I may have run into a potential issue with camel-ahc. I've narrowed it down to a very
specific scenario - a combination of re-using the same ahc component in combination with using
split().parallelProcessing() EIP. Tested with camel 2.14.1 and 2.14.0.

I'll try and demonstrate in a simple route:

        List<String> list = Arrays.asList("alice", "bob", "charles", "david", "edward");

            .to("direct:fetch")                              // [1]
            .split(body()).parallelProcessing()               // [2]
                .log("processing ${body}")
                .to("direct:fetch")                           // [3]
            .log("and back to main processing")

            .log("making http request for ${body}")
            .log("returned from http request for ${body}")


1.       The routes share the same AHC component [1, 3] (i.e. common set of ahc worker threads).

2.       The ahc worker thread will continue processing synchronously between [1] and [2],until
the point the split() parallel thread pool takes over. On an http response, the ahc worker
thread will continue processing synchronouslyas expected.

3.       The above will result in a timeout exception for one of the split exchanges (irrespective
of the size of the list), and the route never completes.
java.util.concurrent.TimeoutException: Request timeout of 60000 ms
       at com.ning.http.client.providers.netty.timeout.TimeoutTimerTask.expire(
       at org.jboss.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(
       at org.jboss.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(
       at org.jboss.netty.util.HashedWheelTimer$

Trace of the above route is attached.

Having two separate ahc endpoints (i.e. with separate thread pools), or without parallel processing
in the split EIP, then the above works fine.
Any thoughts?

Kind Regards,

View raw message