For the first part of route, it should be fine to remove the
streamCaching setting.
For the second part I'm not sure if we need to enable streamCaching
when message sending failed, maybe you can do a simple test for it.

Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Thu, Oct 10, 2019 at 12:56 AM arshid <ayrshi...@gmail.com> wrote:
>
> from(fileURI)
>         .to(dataformatURL)
>         .split(body())
>         .streaming()
>         .parallelProcessing()
>          .marshal().json(JsonLibrary.Jackson)
>            .to("direct:api");
>
>
>
>        from("direct:api")
>       .streamCaching()
>       .onException(Exception.class)
>       .handled(true)
>       .to(errorFormat)
>       .end()
>       .loadBalance()
>       .failover(maxAttempts, false, true)
>     .to(hostsArray)
>     end()
>
>
> above is stripped down version of my route.
>
>
> If I remove streamcaching the route works fine
>
> Sent from Mail for Windows 10
>
> From: Willem Jiang
> Sent: 09 October 2019 05:58
> To: users@camel.apache.org
> Subject: Re: too many objects
>
> The TempfileManager is used in the CachedOutputStream.java[1].
> If you can provide your route, we can see if disable the stream
> cache[2] have any side effects on your route.
>
> [1]https://github.com/apache/camel/blob/master/core/camel-support/src/main/java/org/apache/camel/converter/stream/CachedOutputStream.java
> [2]https://camel.apache.org/manual/latest/stream-caching.html
>
> Willem Jiang
>
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Mon, Oct 7, 2019 at 7:34 PM arshid <ayrshi...@gmail.com> wrote:
> >
> >
> >
> > Hi all,
> >
> >
> >
> > I am reading a csv file around 300 gb and then splitting it and parsing it 
> > to json and sending it to rest api using http4 provider.
> >
> > The problem whenever I use http4 provider it creates lots of objects of 
> > type TempfileManager. Which results in slow down after running for few 
> > hours.
> >
> > I have attached the screenshot of jvisualvm
> >
> >
> >
> > Can anyone help me understand in what is happening
> >
> >
> >
> >
> >
> >
> >
> > Sent from Mail for Windows 10
> >
> >
>

Reply via email to