我正在尝试使用条件和拆分器实现路由。
from("{{" + feed + ".downloadSource}}")
.routeId(feed)
.setProperty("workDirectory",simple("{{workDirectory}}"))
.setProperty("splitSize",simple("{{" + feed + ".splitSize}}"))
.setProperty("feedName", simple(feed))
.setProperty("tableName",simple("{{" + feed + ".tableName}}"))
.setProperty("options", simple("{{" + feed + ".options}}"))
.setProperty("dateFormat", simple("{{" + feed + ".dateFormat}}"))
.setProperty("headerFormat", simple("{{" + feed + ".headerFormat}}"))
.setProperty("authenticateURL", simple("{{" + feed + ".authenticateURL}}"))
.setProperty("username", simple("{{" + feed + ".username}}"))
.setProperty("password", simple("{{" + feed + ".password}}"))
.loop(24)
.split(beanExpression(new APProcessor(), "getSplitProcessor"))
.process(APProcessor.getDownloadProcessor())
.process(APProcessor.getNamingProcessor())
.to("{{" + feed + ".downloadDestination}}")
.choice()
.when(simple("${property.CamelSplitComplete} == true"))
.process(APProcessor.getAggregatorProcessor())
.process(new RSProcessor())
.endChoice();
当此路由在 APProcessor 方法 getSplitProcessor 中执行时,当我检索 CamelLoopIndex 时,它每次都返回 0。如果我删除选择块,它执行得很好。我错过了这个问题。需要帮忙。