Hi All,
I want to broadcast to multiple recipient with different name. How can I get
all the filename?
from("file://D:/input").process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
exchange.getIn().setHeader("dest",
"file://D:/output/a?fileName=myfile-${date:now:yyyyMMdd-HHmmssSSS},file://D:/output/b?fileName=test-${date:now:yyyyMMdd-HHmmssSSS}");
}
}).recipientList(header("dest").tokenize(",")).parallelProcessing().process(new
Processor() {
@Override
public void process(Exchange exchange) throws Exception {
Message in = exchange.getIn();
String fileName = in.getHeader(Exchange.FILE_NAME_PRODUCED,
String.class);
System.out.println("Filename: " + fileName);
}
});
Thanks for the help
--
View this message in context:
http://camel.465427.n5.nabble.com/Get-filename-in-recipientList-tp5722830.html
Sent from the Camel - Users mailing list archive at Nabble.com.