camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Quartz <siau_...@mailcity.com>
Subject Get filename in recipientList
Date Fri, 16 Nov 2012 07:50:58 GMT
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-tp5722829.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message