Not every possible use case is a perfect fit in Camel.

Why dont you just use a timer and invoke a bean, and have that bean do
some File IO to list all the files.
And put the java.io.File into a List, and then you can send that to
Camel if you like using a producer template.



On Fri, Jun 10, 2011 at 11:51 PM, boday <[email protected]> wrote:
> To your first question...the issue is that your file consumer had a 60s delay
> and completionFromBatchConsumer() mode uses that as the delay...your other
> timeout used only 10s
>
> To your 2nd question, I couldn't get that to work either.  Not sure if its a
> bug or just a limitation of trying to aggregate and re-read File exchanges
> (because they were already moved, etc).  You can use
> .convertBodyTo(InputStream.class) to get a handle to the stream (and convert
> to byte[]), but this doesn't seem to work with Aggregator either.
>
> I'll play around with it a bit.  I imagine a custom Aggregator class would
> help the cause to get the format you need...
>
>
> fachhoch wrote:
>>
>> I tried with     .convertBodyTo(File.class)  , I was able to get filename
>> but when I tried to read the file to byte array I got IO  exceptions ,
>> file does not exsists , obviously because I said the delete option to true
>> , please advice me how to get file content as byte array ?
>>
>
>
> -----
> Ben O'Day
> IT Consultant -http://consulting-notes.com
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/read-all-files-in-folder-tp4474104p4477397.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to