1

I have dynamic spring integration flow

FTP -> downloads the files and put in the directory "C:\testing" Transformer will move the files to "XYZ" directory

SFTP -> downloads the files and put in the directory "C:\testing" Transformer will move the files to "XYZ" directory

Now what I see for example FTP has downloaded the file and before while transformer is moving the file SFTP Polls happens

SFTP see the file in "C:\testing" directory so it also process the message and obviously throws the exception since file was moved

Now is it the requirement to have different loca directory to each flow?

If there is any other way

Makky
  • 17,117
  • 17
  • 63
  • 86

1 Answers1

3

Now is it the requirement to have different loca directory to each flow?

That's correct because those polling channel adapters knows nothing about each other and just take a content of the dir for their logic.

So, to make everything working well, you indeed has to have individual local dirs for everything polling remote file channel adapter. There is just no any correlation between channel adapter and those local files.

Artem Bilan
  • 113,505
  • 11
  • 91
  • 118
  • That make sense and thanks for clarification. I have setup different folders and it does work. BTW I have enabled the history @EnableMessageHistory but when I get to "handle" method I don't see the history in the headers. Does history not work with ftp/sftp adaptoers? – Makky Jan 03 '20 at 16:20
  • I think that's different story and deserves a separate SO thread. – Artem Bilan Jan 03 '20 at 16:26
  • https://stackoverflow.com/questions/59582449/spring-integration-dsl-history-issue – Makky Jan 03 '20 at 17:00