0
我已將一個文件「file.txt」作爲blob消息發送到Queue「A」。我想將「file.txt」接收到本地文件夾「D:/ output」。如何使用Camel從ActiveMQ接收文件?
我試過下面的代碼。但是沒有用..
CamelContext context = new DefaultCamelContext();
ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
context.addComponent("test-jms",
JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
context.addRoutes(new RouteBuilder() {
public void configure() {
from("test-jms:queue:A").to("C:/output");
}
});
請幫助我..
感謝阿倫
Thanku vikingsteve – mikhail 2015-03-02 12:28:08