Hi,

I’m using file and FTP consumer endpoints (Camel 2.22.1) in a clustered setup, 
backed with Hazelcast and write-through persistence using the following 
endpoint options:
idempotent=true&idempotentRepository=#hazelcastIdempotentRepository&idempotentKey=#keyExpression&readLock=idempotent-changed
 for the file endpoint
idempotent=true&idempotentRepository=#hazelcastIdempotentRepository&idempotentKey=#keyExpression&readLock=changed
 for the FTP endpoint

I discovered that there is a difference in the behaviour of both endpoints:

file component: confirm method is invoked after processing the files
FTP component: confirm method is not invoked after processing the files

When readLock=idempotent-changed is set on the file endpoint, 
FileIdempotentChangedRepositoryReadLockStrategy is being used and the 
releaseExclusiveReadLockOnCommit method is
invoked which triggers the confirm method on the idempotent repository.
According to the Camel docs this type of read lock is not supported by the FTP 
component. In my setup FtpChangedExclusiveReadLockStrategy is being used, which 
is never invoking the confirm method
on the idempotent repository (releaseExclusiveReadLockOnCommit is an empty 
method).

I read the following in the Camel in Action book: To commit the Exchange, the 
confirm method is invoked on the idempotent repository

Does this imply that the Exchange is never committed in case of the FTP 
component. Is this expected behaviour?

Thanks,

Robin

Reply via email to