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.

Reply via email to