What do you mean the "file had been rewriting"? Do you mean it had already been written to? Are you always writing to the same file name? When a new transaction starts you can change the file name it is writing to or you can move the existing file somewhere else. At some point I assume that you are either sending the file somewhere or someone is picking the file up. If not, how would you ever be able to write to the same file name regardless of what mechanism you are using?
The problem you stated is that you have multiple records you are reading in and then want to write them out but they are overwriting the file. To make that behavior change you have to append to the file. When a new file comes in for processing you can check if the file already exists and move it. That's why I said you have to give a few more details. On Mon, Oct 3, 2016 at 8:35 AM, retatu <matheus.rehb...@unijui.edu.br> wrote: > Yes, but if I use fileExiste=append, my file will have redundancy, because > when I recompile the code with fileExiste=append, the file had been > rewriting... you undesrtand? > > > Ranx wrote > > This a rather nebulous question. Can you post the routes you are using? > > I > > suspect you are not setting the append flag on the file writer. But > > without seeing the code you are using it is impossible to tell. > > > > fileExists=append > > > > Look up the specifics on the syntax here: > > http://camel.apache.org/file2.html > > > > > > -- > View this message in context: http://camel.465427.n5.nabble. > com/Splitting-a-Body-and-losting-old-informations-tp5788271p5788310.html > Sent from the Camel - Users mailing list archive at Nabble.com. >