Spring Integration DSL FTP 问题

huangapple go评论77阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2020年1月3日 23:48:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/59581452.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定