camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Thomas <>
Subject Camel file component URI dynamic options & Filter query
Date Wed, 27 Jan 2016 21:34:32 GMT

    I am trying to make a scenario execute using Camel Spring DSL .

    My idea is to processing some files in a numerical seq order  from a
folder ,  after processing a file I need to check for the next file
sequence which need to be processed from DB.
    The logic of get the next sequence is okay but i am not sure how do i
pass this information to another route to process that single file only . I
though about using sequencer etc. but it does not seem fitting it. The only
option i see is using File Filter .
     But how do I pass this information to a another route  . For example I
have to test  below approach(Not sure if its right way to go).

   I tried the UserCSVTODB route just to test , the filter worked fine  but
the other files also got moved to the complete folder. I expected that only
the matched file in filter should be moved and not others. Is there any way
I can make this happen , so in the next run it picks
  the next sequence file . (probably I need to loop back which is another
question )

<route shutdownRunningTask="CompleteCurrentTaskOnly" id="1">
    <from uri="direct:start"/>
   <setHeader headerName="filename">
    <simple>data.4.csv</simple>  (this will be replaced which a processor
or bean call)
      <to uri="UserCSVToDB"/>

<route shutdownRunningTask="CompleteCurrentTaskOnly" id="UserCSVToDB">
       <simple>${in.header.CamelFileName} == 'data.4.csv'</simple>
       <to uri="mock:result"/>


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message