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。 謝謝
感謝您的幫助克勞斯! –