骆驼文件组件 - IdempotentRepository 和 InProgressRepository 之间有什么区别

Camel File component - whats the difference between a IdempotentRepository and a InProgressRepository

IdempotentRepository 和 InProgressRepository 之间到底有什么区别? 我有以下来自 the File component page 的定义:

对我来说,这些是相同的定义,只是措辞略有不同。 他们也可以使用相同的幂等存储库。

所以我有点困惑,我需要两者吗?或者 idempotentRepository 是否足够好?

在阅读以下信息之前,请确保您已阅读并理解 idempotent 的概念。


IdempotentRepository - 用于存储已处理文件缓存的位置(即文件已被您的路由使用和处理)。检查幂等特性时正在使用。

InProgressRepository - 用于存储当前正在进行的文件(即要在当前批处理中使用的文件)的缓存的地方。始终供文件使用者使用。

IMO,通常总是需要 InProgressRepository 和默认设置(基于内存的存储库)。如果需要 idempotent,可能需要 IdempotentRepository 并选择自己的设置(基于文件基于 JPA、...)反对应用重启。