camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zulio84 <>
Subject StreamCaching and multiple context
Date Mon, 13 Jan 2014 17:03:17 GMT
Hi, I've the following scenario:

Inside a CamelContext with enabled streamcaching I've this Route:

<camelContext xmlns=""
      <route streamCache="true" id="my-route">
        	<from uri="jetty:http://localhost:8903/MyApp" /> (1)
                 <process ref="dispatcherProcessor" />

Inside the dispatcherProcessor I analize the request, and I load and execute
a custom route from xml definition, (also the route context have enabled
streamcaching), inside the route i call a remote url, then i send back the
response throw the system.

Custom Route Example: 

<camelContext xmlns=""
    <from uri="direct:start"/>
    <to uri="http4://remoteUrl"/>
  </route> (2)

I defined (i'm using camel-core 2.12.1) the StreamCachingStrategy for handle
big messages, so when i receive the response from the remote url (inside the
route I loaded...)  Camel creates the tempFile for the stream, but also it
deletes the tempFile (at point [2]), correctly, but before i sent the
response back to the client inside the principal context (at point [1]).

How can I manage thi situation? I need to use streamCaching, i don't want to
buffer messages.

Any idea???



View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message