【发布时间】:2013-04-25 19:02:46
【问题描述】:
我想在 Camel Exchange 上设置一个属性,然后在保存文件时使用该属性。在我的骆驼 dsl 中,我有以下内容:
.process(processorToSetExhangeProperty) // sets the property <uid> on the exchange
.to("file:/tmp?fileName=file-" + property("uid") + ".xml")
文件被保存为:
"file-property{uid}.xml" though
我的处理器如下:
@Override
public void process(Exchange exchange) throws Exception {
UUID uuid = UUID.randomUUID();
exchange.setProperty("uid", uuid.toString());
exchange.setOut(exchange.getIn());
}
对可能出现的问题或如何实现这一点有任何想法吗?
【问题讨论】:
标签: java apache-camel