camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marcelcasado <>
Subject Issues using camel split and aggregator together
Date Tue, 03 Dec 2013 21:04:59 GMT
I have an issue when using camel split and camel aggregator together the
messages continue down the route before all the messages from split has been
completely processed. In my route splited-agregated messages get into the
"finally" block when I was expecting that only one will get to the "finally"
only once after all the split messages has been completed. I tried different
things but not been able to get to hold the splited messages to hit the
"finally" block.

What I'm trying to do is to split xml elements and the batch them  using the
"aggregate" so I do batch processing. Ideally when done with all the
processing I want to hit the "finally" block.

Here are the camel routes:

        fromF(readUri, inboundDataDir, pollingInterval, filterBeanName)
                .to("bean:" + interfaceActivityReportEnricher)
                .to("bean:" + tenantIdEnricher)
                .split(stax(splitClass, false))
                .to("direct:" + batchingStrategy)
${exception}, ${property."
                        + INTERFACE_ACTIVITY_REPORT_PROPERTY_NAME + "})")
.to("bean:completedFileNameEnricher?method=enrichWithCompletedFileName(*," +
inboundDataDir + "," + outboundDataDir + ")")
                .simple("${property." +
                .toF(writeUri, outboundDataDir, interfaceActivityReportDir)

        if (batchingStrategy == "sizeStrategy-TenantIdCorrelation") {
                    // aggregate all exchanges correlated by the
                    // Aggregate them using the ArrayListAggregationStrategy
strategy which
                    // and after N messages has been aggregated then
complete the aggregation
                    // and send it to processor
                    .aggregate(property(TENANT_ID_PROPERTY_NAME), new
                    .to("bean:" + importProcessor)




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

View raw message