1
votes

I have a requirement to in my inbound sftp adapter to accept certain file format and if that accepted file format with unique name is processed already then audit duplicates in db and reject that duplicate file and move it to some archive location. I am not sure how that can be implemented. I did try using this class AbstractFileListFilter to extend my own custom filter but looks like it does not serve the purpose of accept once only filter.

Any suggestions. I did notice something in spring integration docs about SftpPersistentAcceptOnceFileListFilter but not sure how it can be customized.

1
Found sample GIST here gist.github.com/garyrussell/854516993283495e0b40 Will look in to this for now but if someone has better suggestion please respond.user509755

1 Answers

0
votes

Since you are going to "audit" the duplicate files I'd suggest you to take a look to the Idempotent Receiver. That component can be applied to the next consumer after <int-sftp:inbound-channel-adapter> and the configuration of discardChannel can help you to achieve the requirement for audit to DB flow.