camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem jiang <willem.ji...@gmail.com>
Subject Re: Streaming a PDF from remote machine
Date Tue, 14 May 2013 14:02:56 GMT
I'm afraid you have to implement the timeout mechanism yourself.
I don't aware camel provides this feature out of box.

BTW, I think the solution2 that you have is a good one.   

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, May 14, 2013 at 4:46 PM, Chinababu Illa wrote:

> Thanks Willem.
>  
> A bit more details on the problem.
>  
> There are 3 applications involved in this issue. FrontEnd, Link and Host.
> Link sits between FrontEnd and Host. When FrontEnd sends a request (http
> post) to Link it in turn sends a request to Host and also creates two
> streams one to read from Host and other one to send the same data to
> FrontEnd. Due to slow streaming from Host, the FrontEnd to download the file
> is taking longer time. And we cannot afford user waiting for that longer.
> So, want to terminate downloading after certain period of time.
>  
> Please find details below for your points.
>  
> *Are you using FTP to download the file?*
> - /No./
>  
> *I'm not sure how the BufferedInputStream is involved. *
> - /FrontEnd reads response as Stream (InputStream) is how
> BufferedInputStream involved here.
> We are wrapping InputStream with BufferedInputStream./
>  
> *If the file is downloaded, the BufferedInputStream will never time out.*
> - /Consider a case where file is still downloading and read never gets
> timedout as it is getting data (a less data) for every read/
>  
> *If the BufferedInputStream has the timeout mechanism, I don't think you
> need to check if the File is download.*
> - /BufferedInputStream has the timeout mechanism but it will never timeout
> as it gets data within timeout period./
>  
>  
> I have already got two solutions with me.
>  
> 1) Implementing timeout manually (not a good idea, not elegant solution)
> 2) Create a message listener send a message to start downloading, send a
> message to terminate downloading after certain time.
> 3) Looking if Camel can solve this by auto imposing timeout.
>  
> So, please let me know if Camel has a solution for this kind of problems. If
> so, point me what to look into.
>  
> Thanks,
> Chinna
>  
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Streaming-a-PDF-from-remote-machine-tp5732401p5732474.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).




Mime
View raw message