Hi

You can use a bean method that computes the file name. And then that
bean has the logic to know about the 5 minute rule.

There is a bean method example here
http://camel.apache.org/file-language.html


On Fri, May 29, 2015 at 7:03 AM, Vanshul.Chawla
<[email protected]> wrote:
> Delayer will just delay the message to be sent to consumer.
>
> Our requirement is to keep on appending in a file and create next file after 
> 5 minutes are elapsed. Ie keep file write in append mode so that all messages 
> coming in 5 minutes are placed in file and all messages in next 5 minutes in 
> next file and so on.
>
> Aggregator is an option but we want to write message in file as soon as it 
> comes to us.
>
> Thanks and Regards,
>
> Vanshul Chawla
>
> -----Original Message-----
> From: Ravindra Godbole [mailto:[email protected]]
> Sent: Friday, May 29, 2015 10:19 AM
> To: [email protected]
> Subject: Re: Camel File Write per 5 minute
>
> Have you explored delayer option. ?
>
> http://camel.apache.org/delayer.html
>
>
> On Fri, May 29, 2015 at 10:12 AM, Vanshul.Chawla <[email protected]>
> wrote:
>
>> Hello,
>>
>> We have a Camel context wherein we are writing file per minute.
>>
>> uri="file:src/output?fileName=XXX_${date:now:yyyyMMddhhmm}_1.txt&amp;fileExist=Append"
>> />
>>
>> Is there a way we can have a file per 5 minute without writing any
>> extra code?
>>
>>
>> Thanks and Regards,
>>
>> Vanshul Chawla
>>
>>
>
>
> --
> - Ravi
>
> *[ View My Youtube Channel
> <https://www.youtube.com/playlist?list=PL5Y_TlNjh0D59A4K3yQQR7gNAslnxDmRB>
> ]*
>
> Phone: +91 *98 509 760 91*



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to