Reputation: 3029
We have 3 timeouts in Apache-HttpClient:
HttpClients.custom()
.setConnectionManager(cm)
.setDefaultRequestConfig(RequestConfig.custom()
.setConnectTimeout(...)
.setSocketTimeout(...)
.setConnectionRequestTimeout(...)
.build();
Which:
But AkkaHttpClient only has connecting-timeout
and doesn't have any configuration property for Socket Timeout
. Is There any equivalent prop or way for setting a default Socket Timeout
for requests?
Upvotes: 0
Views: 34
Reputation: 20551
In general for timeouts in the client beyond the connecting-timeout, the recommendation is to use the various Akka Streams operators (e.g. idleTimeout
), which give you far more control.
There is also a general idle timeout which will close connections if nothing is sent or received: this is intended as a global safety feature, so it can't be configured per-request.
Upvotes: 2