Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两台服务器轮询到相同的 ftp 位置。当文件放置在该位置时,两个服务器都在挑选文件。但我只需要一台服务器来选择文件并处理和删除。我使用的是 Camel 2.16.2 版本。有没有办法解决这个问题?
Camel FTP 在内部使用了大部分的 camel-File2 API。所有,骆驼文件的选项都是继承的。
有许多策略可以避免对同一文件进行并行处理。使用 preMove、moveFailed、readLock、readLockRemoveOnCommit Camel-File 选项。
例如,您可以使用以下参数。
ftp://{{input.folder}}?readLock=rename&preMove=.inprogress&moveFailed=.error