You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ganga_camel <ga...@gmail.com> on 2017/01/29 14:12:43 UTC

Camel Aggregator - Partial Data written to file

Hi,

I have written a piece of code that performs the below operations

1.Reads multiple files from input folder
2.applies xslt on each of the response
3.aggregates the transformed data
4.writes to a file in append mode

The Problem I am facing is, when all of the translated data (from all the
multiple files) is written into a single file in append mode, there is a lot
of partial data that is captured in the output file.

However, if I write the transformed output from each hit to input file into
individual multiple files VS single file, then there is no data loss.

Somehow, aggregating data and writing into single file in Append mode is
causing data loss. 

My code looks something like this

from("file:APIDataSamples?noop=true&maxMessagesPerPoll=1")
                .log("working on Vendor")
                .to("xslt:xslt/VendorTest.xsl")
                .aggregate(new
Aggregaterecords()).constant(true).completionTimeout(1500).completionSize(750)
          
.to("file:test/output/OutputFiles/final?fileName=finalOutput.csv&fileExist=Append")
           .end();

Appreciate any help or guidance.

Thanks,
Ganga



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Aggregator-Partial-Data-written-to-file-tp5793153.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Aggregator - Partial Data written to file

Posted by sa_james <sa...@hotmail.com>.
Do your logs report multiple threads writing to the file?

Did u try with a single thread? something along the line of:

from("file:APIDataSamples?noop=true&maxMessagesPerPoll=1").threads(1,1)...





-----
Guile Newbie
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Aggregator-Partial-Data-written-to-file-tp5793153p5793272.html
Sent from the Camel - Users mailing list archive at Nabble.com.