I have created https://issues.apache.org/jira/browse/CAMEL-14823
Thanks.

________________________________
From: Claus Ibsen <claus.ib...@gmail.com>
Sent: Wednesday, April 1, 2020 12:11
To: users@camel.apache.org <users@camel.apache.org>
Subject: [EXTERNAL] - Re: stream caching not configurable for rest consumer?

Hi

Ah yeah looks like the code should be identical for those 2 (or maybe
just one common method as its InputStream as input).
And then they should check the camel context for stream caching in use
or not. Then you can turn it on|off on context level and have it work.

Can you create a new JIRA ticket

On Wed, Apr 1, 2020 at 11:06 AM Vojtech Fried <vfr...@opentext.com> wrote:
>
> Hi,
>
> I am trying to fix upload of huge files via camel rest endpoint. The problem 
> is that stream caching enables itself in this case (without being enabled in 
> camel context or the route), but when camel asks a StreamCachingStrategy if 
> the data should be moved from memory to file, it always says no, because it 
> has "enabled" flag false (because no one enabled stream caching).
>
> There is a Jira issue 
> https://urldefense.com/v3/__https://issues.apache.org/jira/browse/CAMEL-8821__;!!Obbck6kTJA!Mgt7NJHDilliMB-tmUd04UaESpJLL6kaGPRG0pn6alRqo2ZN25TD-AQTWe2DPxWy$
>   that should have fixed it, but it actually did not, because as the last 
> comment says, it calls a wrong method "readResponse..." instead of 
> "readRequest...", the fix is only in "readRequest..." method. So I think it 
> should be reopened.
>
> Is there any other way how to disable stream caching?
>
> My code is in configure method in a class that extends RouteBuilder:
>
> restConfiguration()
>             .contextPath(...)
>             .enableCORS(true)
>             .component("servlet")
> rest("...")
>             .id("...")
>             .produces("application/json")
>             .post("...")
>             .to("direct:...");
>
> Vojtech



--
Claus Ibsen
-----------------
https://urldefense.com/v3/__http://davsclaus.com__;!!Obbck6kTJA!Mgt7NJHDilliMB-tmUd04UaESpJLL6kaGPRG0pn6alRqo2ZN25TD-AQTWU2V8rSp$
  @davsclaus
Camel in Action 2: 
https://urldefense.com/v3/__https://www.manning.com/ibsen2__;!!Obbck6kTJA!Mgt7NJHDilliMB-tmUd04UaESpJLL6kaGPRG0pn6alRqo2ZN25TD-AQTWV_-2ajy$

Reply via email to