This sounds like a good application of an aggregator ( http://camel.apache.org/aggregator2.html <http://camel.apache.org/aggregator2.html> )
Keep the first lines in the aggregation repository, and then have it complete one the file is uploaded. On completion, you can update the DB. > On Apr 15, 2016, at 12:50 AM, sungkwon.eom <skeo...@gmail.com> wrote: > > Hello, this is the scenario what I want to handle...... > > > 1) load files from a directory.... > 2)collect first line from each files.... (Using this data DB will be > updated later) > 3)compress files to a single tar.gz file. > 4)upload the compressed file to FTP site. > 5)update DB table over the compressed and FTP uploded files using temporary > data from (2). > > > In here, how can I hold the first line of each files and how to pass the > line data to DB route? > Of course if compress & FTP uploading is fail, DB update should not occur. > > Thanks, in advance. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/how-to-hold-temporary-data-to-use-later-tp5781121.html > Sent from the Camel - Users mailing list archive at Nabble.com.