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

File consumer should let user specify readlock checking period

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.0
    • Component/s: camel-core
    • Labels:
      None
    • Environment:

      Linux 64bits
      Java(TM) SE Runtime Environment (build 1.6.0_23-b05)

      Description

      Currently the only reliable readLock that we can use is "changed", but even with that, the default setting is 1 second which is not long enough if the file is being written to very slowly. So we have to provide a exclusiveReadLockStrategy which is exactly the same as FileChangedExclusiveReadLockStrategy with a longer sleep time.
      It'll be great if we can have an option like readLockCheckInterval so users can specify how long the file should be checked again.
      Something like:
      from("file:/data/inbox?readLock=changed&readLockCheckInterval=5000&readLockTimeout=60000")

        Activity

        Hide
        ngochai Pham Ngoc Hai added a comment -

        I just go ahead and do a quick patch to implement what I mention above

        Show
        ngochai Pham Ngoc Hai added a comment - I just go ahead and do a quick patch to implement what I mention above
        Hide
        davsclaus Claus Ibsen added a comment -

        trunk: 1057505.

        Thanks for the patch. I updated the wiki documentation as well.

        Show
        davsclaus Claus Ibsen added a comment - trunk: 1057505. Thanks for the patch. I updated the wiki documentation as well.

          People

          • Assignee:
            davsclaus Claus Ibsen
            Reporter:
            ngochai Pham Ngoc Hai
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development