If you are using the aggregator with groupExchanges()...then you can get the
exchanges like this...         

from("file:/tmp/inbox")
        .convertBodyTo(String.class)
        
.aggregate(constant(true)).completionFromBatchConsumer().groupExchanges()
        .process(new Processor() {
                public void process(Exchange exchange) throws Exception {
                        ArrayList<Exchange> grouped =
exchange.getProperty(Exchange.GROUPED_EXCHANGE, ArrayList.class);
                        for (Exchange exch : grouped) {
                                System.out.println("body->" + 
exch.getIn().getBody(String.class));
                        }
                }
        });


fachhoch wrote:
> 
> Please   tell  me on how to get all files in my processor
> 
> My processor  gets  exchange but I have no clue how to get all files from
> exchange are  there any examples?
> 


-----
Ben O'Day
IT Consultant -http://consulting-notes.com

--
View this message in context: 
http://camel.465427.n5.nabble.com/read-all-files-in-folder-tp4474104p4476743.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to