3 Replies Latest reply on Jun 26, 2014 1:31 PM by trohovsky

    File Binding

    jcoders

      Good Morning,

                           I have a project that i am working on that requires File polling, to poll for changes to a text file and read it in only if there are changes to it.I am using the switchyard version 1.1.1-p5-redhat-1.I created a file binding that does the polling but am unable to figure out how to pull in a file only if it has changed versus reading it each time.I saw a post on a camel site detailing the following to make this happen

       

      from("file:/somedir?noop=true&idempotentKey=${file:name}-${file:size}")

      Or

      from("file:/somedir?noop=true&idempotentKey=${file:name}-${file:modified}")

       

      source  - http://camel.apache.org/file2

       

      I see options for noop and idempotent but none for idempotentKey -  so i tried setting this via the additional URI parameters tab and that fails the build itself with schema validation errors.Additionally also set the  idempotent flag to true, but no luck.I was hoping someone could help me out/point me in the right direction.

       

      Regards

      Rajat