1

Apache's org.apache.http.client.config.RequestConfig has both a connectTimeout and a connectionRequestTimeout.

The documentation states that:

connectTimeout - is the timeout until a connection with the server is established
connectionRequestTimeout - is used when requesting a connection from the connection manager

I understand what connectTimeout is and why someone would use it, but I do not understand why someone would set a connectionRequestTimeout. What is an example use case of that?

1

1 Answer 1

2

connectionRequestTimeout would happen when you have a connection pool and they are all busy. Depending the application, you are interested in timeout, for example, if you are asking for real time data.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.