camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dermoritz <>
Subject How detect finish in Composed Message Processor EIP?
Date Tue, 13 Oct 2015 13:36:49 GMT
I have a route (triggered manually) that looks like this (pseudo code)

        from( trigger )
            .routePolicy( new FinishNotifier( onFinsh ) )
            .to( JDBCEndpoint ).split().body()
            .process( setIdAndHeaderCount )
            .aggregate( header( "id" ), packAggregator )
            .completionSize( header( "count" ) )
            .parallelProcessing() // breaks on done
            .process( validationProcessor )
            .to( JDBCEndpoint )

Since this is not working - "parallelProcessing" breaks "onCompletion" 
(without parallelProcessing all works finr)
Claus suggest "Composed Message Processor EIP" (thanks again).

There are 2 ways suggested: "splitter only" but this way doesn't fit because
i need the headers to be set and completionSize (putting all this logic into
aggregator is too much at the moment).

The second way suggests to decouple split and aggregate into 2 routes
connected by a seda queue. *But how to detect that all work is done?* I need
to now when the original exchange (a large iterator/resultSet) is completed
and all processing steps are done. I am not sure if it is sufficient to
detect that seda queue is empty for some time.

Thanks in advance

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message