Spring rest template readTimeOut

Seb picture Seb · Aug 16, 2017 · Viewed 25.6k times · Source

I'm trying to understand the readTimeout available on restTemplate, what is it exactly ?

Is it the the total amount of time the request can take before we get the timeout exception ?

Answer

Dhana picture Dhana · Aug 16, 2017

As far as i knew, In restTemplate we have 3 type of timeouts

  1. ConnectionRequestTimeout. This is timeout in millis for getting connection from connectionManager

  2. ConnectionTimeout. This is timeout in millis for establishing connection between source and destination

  3. ReadTimeout. This is timeout in millis which expects the response/result should be returned from the destination endpoint.