我需要控制我的路线,并且我正在为 Camel 使用 spring DSL。
我需要公开一个服务,该服务将对参数中给出的routeId执行这些操作。
以下代码不起作用(正文包含routeId)
<route id="stopRoute">
<from uri="direct:stopRoute"/>
<log message="about to stop a route"/>
<to uri="controlbus:route?routeId=${body}&action=stop"/>
<to uri="controlbus:route?routeId=${body}&action=status"/>
</route>
我也尝试过使用简单的语言,但我无法找出正确的语法
最佳答案
查看此常见问题解答 http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html
使用<toD>
使 to 动态化。
关于java - 使用 spring DSL 中的 controlBus 和参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36630314/