camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Splitting a List and deleting it at the end
Date Thu, 29 Jul 2010 13:32:50 GMT
Hi

Use streaming mode which can then iterate the payload.

So if your payload can be converted into an Iterator then you dont
need to have all the 100 000 objects loaded into memory.



On Thu, Jul 29, 2010 at 3:22 PM, Yann <yann.bouffant@gmail.com> wrote:
>
> Hi,
>
> I'm splitting a list containing 100 000 objects. Each object is sent to a
> queue after a short delay.
> If I don't clear my list, my JVM will explode (java heap space...). How
> could I get my initial list after splitting it ?
> Below my route :
> from("bean:bean?method=read")
>         // List split
>         .split(body(List.class))
>         // delay
>         .delay(1)
>         // body conversion
>        .convertBodyTo(Person.class)
>         // queue
>        .to("activemq:queue");
>        // this is where I should be able to clear the list!
>
> Thanks for any help !
> Yann
> --
> View this message in context: http://camel.465427.n5.nabble.com/Splitting-a-List-and-deleting-it-at-the-end-tp2256727p2256727.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message