13 Replies Latest reply on Jul 14, 2010 6:02 AM by Claus Ibsen

    Problem using dynamic fileName with Camel File Component

    annasw Newbie

      Is it possible to use camel file component for polling files based on fileName parameter in URI?

      Like: <from uri="file://data?&amp;fileName=$"/>

       

      I am trying to get camel file component polling the file based on fileName=$ parameter: <from uri="file://data?noop=true&amp;fileName=$"/>

      For some reason it never camel polls the file. Should it work with dynamic parameter?

       

      (It only pools if I use hard coded file name inside of my routes:

      <from uri="file://data?noop=true&amp;fileName=$"/>

       

       

      public void process(Exchange exchange) throws Exception

      {

         exchange.getOut().setHeader(Exchange.FILE_NAME, myDynamicFileName);          

      }

       

      Thank you very much for your time,

      Anna

       

      Edited by: asilchenko on May 25, 2010 1:29 PM

       

      Edited by: asilchenko on May 25, 2010 1:30 PM

       

      Edited by: asilchenko on May 25, 2010 1:42 PM

       

      Edited by: asilchenko on May 25, 2010 1:53 PM

       

      Edited by: asilchenko on May 25, 2010 4:34 PM