camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: read all files in folder
Date Sat, 11 Jun 2011 07:02:44 GMT
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 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 <> 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 -
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message