You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by tysonj <js...@gmail.com> on 2017/01/23 16:00:48 UTC
Reading multiple files in one exchange (Aggregation Strategy)
Hello all, sorry if this has been covered but this is my first post and I
have searched for ages for this solution.
I see that the from file:/ reader reads one file at a time, and creates an
exchange for each. But my requirement is that I set a from uri as a Quartz
timer, and I would then like to read an entire directory of files into an
aggregator, or an enricher, transforming their content into one body inside
one exchange.
I've tried Aggregating already, however I can't start this from a timer and
then read multiple files.
What is the best way to read an entire directory into one exchange?
Thank you;
Jack
--
View this message in context: http://camel.465427.n5.nabble.com/Reading-multiple-files-in-one-exchange-Aggregation-Strategy-tp5793019.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Reading multiple files in one exchange (Aggregation Strategy)
Posted by tysonj <js...@gmail.com>.
Hi again
So I have worked it out, using a batch consumer on a Quartz2 schedule
?scheduler=quartz2&scheduler.cron=0+0+8+?+*+MON-FRI
I did not realise that you could specify a schedule on the file component!
That has solved everything, as I was trying to trigger a Quartz in the
"from", and then within the route read all these files in. That was getting
complicated.
Thank you;
Jack
--
View this message in context: http://camel.465427.n5.nabble.com/Reading-multiple-files-in-one-exchange-Aggregation-Strategy-tp5793019p5793032.html
Sent from the Camel - Users mailing list archive at Nabble.com.