You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ganga_camel <ga...@gmail.com> on 2016/08/09 17:01:58 UTC

Read file one after other in sequence

Hi,

My requirement is to split the large file into smaller files and then
process one file at a time.

However, the camel file component takes the lock on all the split files and
starts processing. This is consuming all of the CPU and Memory usage goes
high and at one point I get OutofMemoryException.

My route looks like

from("file:data/ReadyForProcess?delete=true")
                .routeId("FetchFilesForProcessing")
                .to("seda:RemoveDeletes")
                .end();

I wanted to know if there is a way I can configure my route to obtain lock
on one file at a time and process one file after other.

Any suggestions is highly appreciated...

Thanks,
Ganga 



--
View this message in context: http://camel.465427.n5.nabble.com/Read-file-one-after-other-in-sequence-tp5786216.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Read file one after other in sequence

Posted by ganga_camel <ga...@gmail.com>.
Thanks for the inputs....It works as expected now...

Thanks Vitalii.



--
View this message in context: http://camel.465427.n5.nabble.com/Read-file-one-after-other-in-sequence-tp5786216p5786223.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Read file one after other in sequence

Posted by Vitalii Tymchyshyn <vi...@tym.im>.
Well, don't use seda as it's asynchronous. Use direct instead.

Best regards, Vitalii Tymchyshyn

Вт, 9 серп. 2016 о 13:02 ganga_camel <ga...@gmail.com> пише:

> Hi,
>
> My requirement is to split the large file into smaller files and then
> process one file at a time.
>
> However, the camel file component takes the lock on all the split files and
> starts processing. This is consuming all of the CPU and Memory usage goes
> high and at one point I get OutofMemoryException.
>
> My route looks like
>
> from("file:data/ReadyForProcess?delete=true")
>                 .routeId("FetchFilesForProcessing")
>                 .to("seda:RemoveDeletes")
>                 .end();
>
> I wanted to know if there is a way I can configure my route to obtain lock
> on one file at a time and process one file after other.
>
> Any suggestions is highly appreciated...
>
> Thanks,
> Ganga
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Read-file-one-after-other-in-sequence-tp5786216.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>