[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski updated HTTPCLIENT-1074:
------------------------------------------

    Fix Version/s: Future
          Summary: Query timeout parameter / request deadline  (was: Query 
timeout parameter)

Stepan,
While not entirely impossible this feature may prove quite difficult to 
implement correctly with the classic (blocking) I/O model. It might be somewhat 
easier to do for non-blocking NIO based components, though. In the past when I 
evaluated the possibility of adding support for request deadlines (or query 
timeout as you put it) I always ended up concluding it was not worth the 
trouble and the extra complexity the support for this feature would have 
entailed.

Oleg

> Query timeout parameter / request deadline
> ------------------------------------------
>
>                 Key: HTTPCLIENT-1074
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1074
>             Project: HttpComponents HttpClient
>          Issue Type: New Feature
>    Affects Versions: 4.0.3
>            Reporter: Stepan Koltsov
>            Priority: Minor
>             Fix For: Future
>
>
> HttpClient has connect timeout and read timeout. I also need a "query 
> timeout" parameter.
> Have a situation:
> We are some server "B". Client "A" calls us with timeout 10s. To serve 
> requests we call some internal HTTP service "C":
> A -> B -> C
> HttpClient is used to call C from B.
> Our call to that service "C" should be completed within 9s or should be 
> interrupted, because:
> * client "A" should get meaningful error message instead of just socket 
> timeout
> * we should not consume server resources (threads, connection) after client 
> "A" stopped a request
> This behavior cannot be implemented with just connect timeout + socket 
> timeout. For example, if socket timeout is 5 seconds, and client sends 1 byte 
> portions, socket timeout won't happen for a long time.
> So I'm requesting "query timeout" parameter. It's value is a system time 
> (milliseconds since epoch). HttpClient should execute request with respect to 
> connect timeout and socket timeout as usual, but if "query timeout" time has 
> come, HttpClient throws an exception.
> AFAIU, this behavior can be now achieved by using a extra thread and abort() 
> method.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to