2016-11-08 5 views
0

行われていることを知っている私は、Apacheラクダに典型的なタスクがあります。Apacheのキャメル - プロパティ、ヘッダーまたは何か他の特定のルートがファイル処理

from(properties.get(EVN.getFolderProperty())) 
    .onCompletion() 
     .log("Done") 
     .end() 
    .log("Start") 
    .split().tokenizeXML("Test") 
     .streaming() 
    .bean(xmlProcessor, "processOneRecord") 
    .aggregate(exchangeProperty("Some key"), xmlAggregationStrategy).copletionSize(100) 
    .bean(resultProcessor, "appendToResult"); 

ので、私はシンプル完了戦略のいずれかを使用しないようにしたい - タイムアウト、サイズ。代わりに - 私はそのようなsomthngで使用するいくつかの状態変数、ヘッダ、プロパティを必要とする:

 .aggregate(exchangeProperty("Some key"), xmlAggregationStrategy).completionPredicate("routeIsFinishFileProcessing" == true) 
    .bean(resultProcessor, "appendToResult"); 

答えて

0

simple表現、.completionPredicate(simple("${property.routeIsFinishFileProcessing == true}")

注意を使用してみてください:あなたはいつでもあなたをtrueにproperty.routeIsFinishFileProcessingを設定するの世話をする必要があります完了したい

関連する問題