You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by contactreji <co...@gmail.com> on 2015/09/30 12:26:37 UTC
Camel REST Api - Stream processing while downloading data
Hello guys
I have following route hitting a REST API and downloads an XML file. The
file is quite huge. About 30 mb + with about 5000 + records.
Now, I was wondering if I can start streaming the data. I might have to wait
about 1-3 mins to complete the download. But can i enable processing as soon
as the download starts. I have anyway enabled splitter with streaming=true.
Am sorry if my Q doesn't make any sense but I was just curious! :-)
*
<route>
<from uri="timer://foo?fixedRate=true&period=3600000" />
<setHeader headerName="Exchange.HTTP_QUERY">
<simple trim="true">key=***************</simple>
</setHeader>
<setHeader headerName="Exchange.HTTP_METHOD">
<simple trim="true">GET</simple>
</setHeader>
<to
uri="http://api.target.com/v2/location?httpClient.soTimeout=3000000&throwExceptionOnFailure=false"
/>
<log message="Data Downloaded - ${body}" />
<split streaming="true">
<tokenize token="Location" xml="true"></tokenize>
<to uri="seda:WriteToOutDirectory" />
</split>
</route>*
-----
Reji Mathews
Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel & Jboss Fuse ESB | Mule ESB )
LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
Twitter - reji_mathews
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-REST-Api-Stream-processing-while-downloading-data-tp5772129.html
Sent from the Camel - Users mailing list archive at Nabble.com.