骆驼选择后处理器在choice()中的聚合器完成聚合之前运行

时间:2019-04-09 16:10:32

标签: kotlin apache-camel spring-camel

我最近在aggregator / choice块中使用when时看到了意外的处理器执行顺序。如果我希望choice块以书面顺序执行,则在aggregator块之后的处理器将在.process { /* start timer */ } .choice() .`when`(somePredicate) .aggregate(constant(true), someAggregationStrategy) .completionInterval(1000) .completeAllOnStop() .log("post-aggregation") // invoked second .endChoice() .otherwise() // ... some other aggregation strategy .endChoice() .end() .process { /* stop timer */ } // invoked first (and the exchange is not an aggregate exchange) 完成聚合之前被调用。

processor

是否有一种方法可以阻止choice之后的aggregator,直到choice完成为止?我想在when完成后执行一些常见的逻辑(停止处理计时器),而不必在每个 FileName = filename; FramesPerSecond = FrameRate; Codec = Encoder; this.Quality = Quality; Height = Screen.PrimaryScreen.WorkingArea.Height; Width = Screen.PrimaryScreen.WorkingArea.Width; int moduloHeight = Height % 10; Height = Height - moduloHeight; int moduloWidth = Width % 10; Width = Width - moduloWidth; 块内重复执行。

0 个答案:

没有答案