Federico Mariani created CAMEL-26977:
----------------------------------------
Summary: camel-file: idempotent=true or noop=true with
readLock=idempotent never consumes a file
Key: CAMEL-26977
URL: https://issues.apache.org/jira/browse/CAMEL-26977
Project: Camel
Issue Type: Bug
Components: camel-file
Affects Versions: 4.18.5, 4.23.0, 4.22.2
Reporter: Federico Mariani
Fix For: 4.24.0, 4.22.3, 4.18.6
With {{idempotent=true}} (or {{noop=true}}, which turns it on) and
{{readLock=idempotent}}, {{idempotent-changed}} or {{idempotent-rename}}, the
file consumer never consumes the file. The consumer adds the key to the
idempotent repository eagerly ({{idempotentEager}} defaults to true), then the
read lock adds the same key to the same repository, is refused, and skips the
file (logged at DEBUG only). The key is removed again, and the file is retried
and skipped on every poll.
{code:java}
from("file:inbox?noop=true&readLock=idempotent&idempotentRepository=#myRepo")
.to("mock:result"); // never receives inbox/hello.txt
{code}
Expected: the file is consumed once, as before 4.7 and as with
{{idempotentEager=false}}: the read lock makes the atomic claim and the
consumer only checks the repository.
Regression from CAMEL-19010 (commit a6a4ecd5a9c7, 4.7.0), which made
{{idempotent=true}} add the key eagerly.
_Claude Code on behalf of Federico Mariani_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)