Oh great - thanks for the suggestions - I think the bean one might work best
for me.

On Wed, Feb 9, 2011 at 10:15 AM, Claus Ibsen <[email protected]> wrote:

> On Wed, Feb 9, 2011 at 11:02 AM, Tom Howe <[email protected]> wrote:
> > Hi, first post, loving camel! (Using with akka - akka.io).
> >
>
> Welcome to the community.
>
> > I need to write a lot of files using camel to a directory and need to
> avoid
> > the directory getting to big.
> >
> > My endpoint at the moment is just file:/to/my/dir.
> >
> > It works ok, except if the harvester of these files goes down for a while
> > and the directory gets too many files, bad things happen!
> >
> > Is there a config option that will create subdirectories below that using
> > random numbers to several dirs deep. eg
> >
> > /to/my/dir/1/4/2/filename
> >
>
> No but you can just compute the file name and provide it as the header
> with the key: Exchange.FILE_NAME
>
>
> You can also use a bean to generate some random path and then use a
> expression as the file name
>
> file:xxxxx?fileName=${bean:myBean.generateSomething}/${file;name}
>
> See some samples here
> http://camel.apache.org/file-language.html
>
> The xxx will have the starting path, so the evaluated value of
> fileName would be appended.
>
>
>
> > Thanks, Tom
> >
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: [email protected]
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Reply via email to