Hi

The Splitter have built-in aggregator, which seems like what you do
with that embedded aggregator

See example
http://camel.apache.org/splitter

Maybe you can take a thread dump when the app is hanging.
Or if you could create an unit test that reproduces the issue would be great.


On Thu, Sep 29, 2011 at 1:03 PM, Peter Thygesen <[email protected]> wrote:
> I have a small camel route that calls a database server, then splits the
> result list using parallelprocessing and a executorserviceref (threadpool).
> When I close the application i writes that it is closing down by hangs...
> and leaves a java process taking 100% cpu.
>
> hope someone can help...
>
> brgds
> Peter Thygesen
>
> (camel 2.8)
> the route looks something like this:
>
>  <camel:camelContext xmlns="http://camel.apache.org/schema/spring";>
>        <camel:package>com.mycompany.package</camel:package>
>
>        <threadPoolProfile id="defaultThreadPoolProfile"
> defaultProfile="true"
>                       poolSize="10" maxPoolSize="20" maxQueueSize="1000"
>                       rejectedPolicy="CallerRuns" keepAliveTime="1000"/>
>
>        <camel:route trace="false">
>            <camel:from
> uri="timer://runOnce?daemon=false&amp;repeatCount=1"/>
>            <camel:bean ref="queryBuilder"/> <!-- set the sql to execute -->
>            <camel:to uri="sql:executeSql"/>
>            <camel:split streaming="false" parallelProcessing="true"
> executorServiceRef="defaultThreadPoolProfile">
>                <simple>${body}</simple>
>                <!-- do something with a row of data -->
>                <camel:bean ref="deliveryImportHandler"/>
>                <camel:setBody>
>                    <constant>imported</constant>
>                </camel:setBody>
>                <camel:aggregate strategyRef="aggregationStrategy">
>                    <correlationExpression>
>                        <header>DELIVERY.latestVersion</header>
>                    </correlationExpression>
>                    <completionPredicate>
>                        <simple>${header.CamelSplitComplete}</simple>
>                    </completionPredicate>
>                    <bean ref="deliveryService" method="flush"/>
>                    <log message="DONE!" logName="com.mycompany.package"
> loggingLevel="INFO"/>
>                </camel:aggregate>
>            </camel:split>
>
>        </camel:route>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to