I have a simple route where I write some string to an output file and then trying to append the contents of the original file. But it ignores and it overwrites the file.
from("file://inputFolder")
.routeId("InputFolderToTestSedaRoute")
.setProperty("myFileConsumedBody", simple("${body}"))
.setBody(constant("FIRST LINE!"))
.to("file://{{outputFolder}}")
.setBody(simple("${exchangeProperty.myFileConsumedBody}"))
.log("*** STEP 100: ${headers} :***")
.delay(10000)
.to("file://outputFolder?fileExist=Append")
;
I added delay to observe what happens.
Am I doing any mistake here? Not sure if this is specific to Windows 10. I am using Camel version 2.24.1. Thanks for your time.
This is bug CAMEL-14127 fixed in version 2.24.3
. You can upgrade, or use workaroud with charset
option.
.to("file://outputFolder?fileExist=Append&charset=utf-8")