I have the following from endpoint to read files:
file:{{filepath.odctocmcls}}?initialDelay=210000&delay=60000&readLock=changed&readLockCheckInterval=600000&readLockTimeout=600500&idempotent=true&inProgressRepository=#jdbcIdempotentRepo&idempotentRepository=#jdbcIdempotentRepo&preMove={{filepathproc.odctocmcls}}/{{filepath.procfnm}}&maxMessagesPerPoll=1&noop=true&eagerMaxMessagesPerPoll=false&sortBy=file:modifiedThe route only processes one file at a time which is required due to a versioning requirement and only porcesses the oldest file first. Also, the route must use the changed lock and be able to set the read lock check interval because the source system writing the files is slow and horrible at marking/locking a file it's writing to. It works great with one problem. I have 6 instances of this camel route installed on separate tomcats on separate VM servers. With this configuration it will process 6 files at a time, one for each install. Is there a way to make other installs in the cluster not process because another install is working? Something similar to exclusiveConsumer for activemq component. It would need to be fail over so that one install goes out the others will process. I'm thinking because the changed read lock uses the marker file as well, having the route check for any marker files from any process and if there is one not process a file and check back again on next poll. Reading the documentation there seems to be numerous possibilities. I could extend the changed file read lock but when I try to do that it doesn't pick up the readLockCheckInterval argument. I could create my own read lock strategy but I don't see or know of a way to after returning true proceed and check the other read locks. Using a process strategy it would seem would entirely ignore the read lock argument according to the documentation. It's also important to note that at this time I can't upgrade beyond 2.12.3. What is the best way to proceed and make this work? Really I just want a check for any marker lock files and if not proceed with the route, if so complete and wait for the next poll and check again. Thanks for any help and advice, been digging on this for a few days and have come up blank. -- View this message in context: http://camel.465427.n5.nabble.com/File-Absolute-Exclusive-for-Clusters-tp5752163.html Sent from the Camel - Users mailing list archive at Nabble.com.
