英文:
Spring Integration DSL FTP Issue
问题
我有一个动态的Spring集成流程
FTP -> 下载文件并放入目录 "C:\testing"
转换器会将文件移动到 "XYZ" 目录SFTP -> 下载文件并放入目录 "C:\testing"
转换器会将文件移动到 "XYZ" 目录
现在,例如,FTP已经下载了文件,在转换器移动文件之前,SFTP轮询发生了
SFTP
看到 "C:\testing" 目录中的文件,因此它也处理了消息,显然会抛出异常,因为文件已经移动了
现在是否需要每个流程有不同的本地目录?
如果有其他方式的话
英文:
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
答案1
得分: 3
"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."
英文:
> 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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论