【发布时间】:2017-06-18 01:18:00
【问题描述】:
我在我的 JVM 中运行了 Camel,并连接了 hawtio。我可以在 hawtio JMX 选项卡中查看 Camel 详细信息。当我更改 camelcontex.xml 中的任何内容并重新启动我的 karaf 时,这些更改并未反映在 hawtio 中。
所以我无法调试我的路由 hawtio。
有人可以建议任何配置,以便更改开始反映在 hawtio 中,我可以通过 hawtio 调试我的路线。
我的 CamelContex.xml
<route id="cbr-route">
<from id="_from1" uri="file://C:/temp/camel"/>
<log id="_log1" message="Receiving order ${file:name}"/>
<choice id="_choice1">
<when id="_when1">
<xpath id="_xpath1">/order/customer/country = 'UK'</xpath>
<log id="_log2" message="Sending order ${file:name} to the UK"/>
<to id="_to1" uri="file:work/cbr/output/uk"/>
</when>
<when id="_when2">
<xpath id="_xpath2">/order/customer/country = 'US'</xpath>
<log id="_log3" message="Sending order ${file:name} to the US"/>
<to id="_to2" uri="file:work/cbr/output/us"/>
</when>
<otherwise id="_otherwise1">
<log id="_log4" message="Sending order ${file:name} to another country"/>
<to id="_to3" uri="file:work/cbr/output/others"/>
</otherwise>
</choice>
<log id="_log5" message="Done processing ${file:name}"/>
</route>
hawtio 源标签路由
<route xmlns="http://camel.apache.org/schema/spring" id="cbr-route">
<from uri="file:work/cbr/input" id="_from1"/>
<log message="Receiving order ${file:name}" id="_log1"/>
<choice id="_choice1">
<when id="_when1">
<xpath>/order/customer/country = 'UK'</xpath>
<log message="Sending order ${file:name} to the UK" id="_log2"/>
<to uri="file:work/cbr/output/uk" id="_to1"/>
</when>
<when id="_when2">
<xpath>/order/customer/country = 'US'</xpath>
<log message="Sending order ${file:name} to the US" id="_log3"/>
<to uri="file:work/cbr/output/us" id="_to2"/>
</when>
<otherwise id="_otherwise1">
<log message="Sending order ${file:name} to another country" id="_log4"/>
<to uri="file:work/cbr/output/others" id="_to3"/>
</otherwise>
</choice>
<log message="Done processing ${file:name}" id="_log5"/>
</route>
非常感谢高级版。
【问题讨论】:
-
我尝试停止并启动所有 hawtio 捆绑包,但无法正常工作
-
Karaf 6.3 Apache Camel 2.17.0 hawtio 1.4.0
标签: java apache-camel jbossfuse hawtio