0
我试图想出一个办法来动态更新属性(从PropertyComponent)不停止骆驼路线: 下面是它的一个例子:重新从骆驼路由一个属性不停止
@Override
public void configure() throws Exception {
CamelContext ctx = super.getContext();
PropertiesComponent pc = new PropertiesComponent();
pc.setLocation("/tmp/apache-deltaspike.properties");
ctx.addComponent("properties", pc);
// Logs Hello World every 2000 milliseconds
from("timer://myEapTimer?fixedRate=true&period=2000")
.log(LoggingLevel.INFO, "com.sample.route", "{{customProperty}}")
.to("log:HelloWorldLog?level=INFO");
}
外部属性文件包含每当Timer触发时要打印的消息。我需要找到一种方法让Route重新加载Property文件而不停止它。 顺便说一句我正在使用Apache Camel 2.17.0。 谢谢
感谢您的帮助克劳斯! –