0
votes

My requirement is to support existing process. Here participant uploads filename*.csv and then uploads filename*.marker to the ftp location. I want to trigger ftp download of filename*.csv once filename*.marker exists on the same ftp location. This process i can't change. The presence of .marker file indicates that the .csv file is done updating and flow of processing the .csv file can begin. I was looking for the inbound channel adapter of spring integration's ftp support. But i don't see any support to download files with some filter criteria (filename*.csv), if on the same location there exists filename*.marker. In other words, I want to filter remote files on some criteria, but want to download different files (may be using inbound channel adapter). Kindly let me know if i can customize the same by implementing any interface etc.

1

1 Answers

1
votes

You need a custom filter to ignore *.csv files where the equivalent *.marker is not present.

public class MyMarkerFilter implements FileListFilter<FTPFile> {
    ...
}

And, in filterFiles drop the file(s) that you don't want to pass the filter.

This is a common use case, consider contributing the filter to the framework.