我是 Apache Camel 新手,我尝试在 sftp 和本地之间进行 csv 文件同步:
public class MyRouteBuilder extends RouteBuilder {
public void configure() {
from("sftp://user@address/location?password=password")
.to("file:location_dir");
}
}
问题是当我在源中的 csv 文件上插入新行时,它将覆盖目标中的文件,而不是附加新行
有没有办法可以仅附加文件的增量,而不是使用 Apache Camel 覆盖文件?
试试这个:
.to("file:location_dir?fileExist=Append")