收集Camel中失败项目的名称/ ID

时间:2017-08-04 13:27:00

标签: scala apache-camel

我想使用Camel实现聚合器分割器模式,我处理文件列表。 removeOnFailure(true)将帮助从列表中删除会导致/触发失败的文件,并且该过程将成功完成,如下面的代码所示。

def files(exchange: Exchange): java.util.Iterator[Path]
def fileProcessor(exchange: Exchange): Unit

from(aDirectEndpoint) ==> {
    aggregate(
      split(files _)
        .streaming
        .parallelProcessing
        .idempotentConsumer(_.in)
        .eager(true)
        .skipDuplicate(true)
        .repository(aRepository)
        .removeOnFailure(true)
        .process(fileProcessor _),
      new GroupedExchangeAggregationStrategy
    )
    .completionTimeout(completionTimeoutMillis)
    .process(jobProcessor)

我想知道是否有办法使用Camel API收集那些失败的文件?

0 个答案:

没有答案
相关问题