I am using AWS SDK to make calls to an appsync endpoint. However, I am unable to understand the significance of needsConnectionLeftOpen in this javadoc: https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/http/HttpResponseHandler.html#needsConnectionLeftOpen--
Does this mean, that the HTTP connection closes regardless of whatever connMaxIdleMillis I specify in Client Configuration ?
final ClientConfiguration clientConfiguration = new ClientConfiguration();
clientConfiguration.setMaxConnections(50);
clientConfiguration.setConnectionMaxIdleMillis(300000);
The HTTP connections created by any response handler that is marked as
needsConnectionLeftOpenis not affected byconnectionMaxIdleMillisas you've effectively marked the connections as self-managed. You've confirmed that you don't want the library to handle the connection and that you'll close it yourself.The
connectionMaxIdleMillisparameter only applies to connections that are not kept open, not in use by the response handler and that are idle in the connection pool.It doesn't affect connections that are kept open by the
needsConnectionLeftOpensetting.The typical usage for
needsConnectionLeftOpenis detailed in the docs: