Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-8387

File consumer fails to acquire lock if readLockTimeout >= readLockCheckInterval

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.14.1
    • 2.15.0
    • camel-core
    • None
    • Novice

    Description

      If the readLockCheckInterval is greater than or equal to readLockTimeout when using readLock=changed, the consumer never picks up any files.

      So this URI will triggers the behaviour:
      file:some-folder?readLock=changed&readLockCheckInterval=1000&readLockTimeout=500

      The problem is that FileChangedExclusiveReadLockStrategy only takes readLockTimeout into account.

      1. FileChangedExclusiveReadLockStrategy get the last modified and size of the file.
      2. It sleeps for the duration configured in readLockCheckInterval
      3. Now the timeout configured in readLockTimeout is exceeded, so FileChangedExclusiveReadLockStrategy logs "Cannot acquire read lock within.." and returns false

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            eiden Christoffer Eide
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: