1

I am using the Camel SFTP component in version 3.12.0 with Hazelcast Idempotent Repository to prevent a message from being processed by several cluster nodes and with readLock=rename to avoid a message being processed while it is still be being written by a third party.

IdempotentRepository idempotentRepository = new HazelcastIdempotentRepository(hazelcastInstance, "ftp-consume-reception-map");

from(sftp(hostname + ":" + port + "/" + inputDirectory)
   .username(username)
   .password(password)
   .delay(delay)
   .maxMessagesPerPoll(maxMessagesPerPoll)
   .move(archiveDirectory)
   .moveFailed(errorDirectory)
   .idempotent(true)
   .idempotentRepository(idempotentRepository)
   .passiveMode(true)
   .readLock("rename"))

Despite this configuration with Hazelcast Idempotent Repository, the same FTP message is consumed and processed by all cluster members. Did I miss something ?

user3849838
  • 113
  • 9

0 Answers0