You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by dermoritz <ta...@hotmail.com> on 2015/10/13 15:36:49 UTC

How detect finish in Composed Message Processor EIP?

I have a route (triggered manually) that looks like this (pseudo code)

        from( trigger )
            .routePolicy( new FinishNotifier( onFinsh ) )
            .to( JDBCEndpoint ).split().body()
            .streaming()
            .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)
(http://camel.465427.n5.nabble.com/When-original-exchange-quot-isDone-quot-with-aggregator-td5772577.html)
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: http://camel.465427.n5.nabble.com/How-detect-finish-in-Composed-Message-Processor-EIP-tp5772615.html
Sent from the Camel - Users mailing list archive at Nabble.com.