camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oceansize <oceans...@tut.by>
Subject Apache Camel aggregator with parallelProcessing completion callback
Date Tue, 16 May 2017 15:21:31 GMT
I'm using Apache Camel aggregator with parallelProcessing to process
aggregated exchanges concurrently:

from("direct:test")               
            .aggregate(constant(true), new
GroupedMessageAggregationStrategy())
            .completionSize(10)
            .completionTimeout(3000)
            .parallelProcessing()
            .to("direct:test2")
            .log("Completed!") //executed for each aggregated exchange  
            .end();

What I need is to get a callback when all aggregated exchanges are processed
and log "Completed!" after that.

Currently, (see the log statement above) - it's getting executed for each
aggregated exchange.

I found that the *AggregateProcessor->public int
getInProgressCompleteExchanges()* would help me (i.e. it's set to 0 when all
aggregated exhanges are processed). But since an instance of
AggregateProcessor is created dynamically - don't have any idea how to call
this method.

Thanks in advance for any suggestion.



--
View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-aggregator-with-parallelProcessing-completion-callback-tp5799641.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message