Ask the Question
Hi colleagues,
We are using cloud sdk to create/read/update/delete BTP destination
For our testing, we have set up a framework where we create destinations concurrently. However it is not allowing more than 5 concurrent request
We found that we can manage parameters like
// Configure connection pooling
PoolingHttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager();
connManager.setMaxTotal(100); // Maximum total connections
connManager.setDefaultMaxPerRoute(20); // Maximum connections per route
However, it is not working if we set this to existing http client.
Do cloud-sdk methods allow specifying these above parameters while creation of HttpDestination or client?
This is our constructor class
this.serviceBinding =
ServiceBindingDestinationOptions.forService(ServiceIdentifier.DESTINATION)
.build()
.getServiceBinding();
this.baseUri = this.serviceBinding.getCredentials().get(DestinationConstants.URI).toString();
this.destinationUri = this.baseUri + DestinationConstants.URL_EXTENSION;
this.commonutils = commonutils;
this.auditLoggingHelper = auditLoggingHelper;
OnBehalfOf user = OnBehalfOf.TECHNICAL_USER_CURRENT_TENANT;
if (commonutils.isLocalProfile() || commonutils.isTestProfile()) {
user = OnBehalfOf.TECHNICAL_USER_PROVIDER;
}
HttpDestination destination =
ServiceBindingDestinationLoader.defaultLoaderChain()
.getDestination(
ServiceBindingDestinationOptions.forService(this.serviceBinding)
.onBehalfOf(user)
.build());
this.destinationClient = HttpClientAccessor.getHttpClient(destination);
And we have different methods to do CRUD with the HttpClient created from the constructor above.
Thanks,
Vipul.
Ask the Question
Hi colleagues,
We are using cloud sdk to create/read/update/delete BTP destination
For our testing, we have set up a framework where we create destinations concurrently. However it is not allowing more than 5 concurrent request
We found that we can manage parameters like
However, it is not working if we set this to existing http client.
Do cloud-sdk methods allow specifying these above parameters while creation of HttpDestination or client?
This is our constructor class
And we have different methods to do CRUD with the HttpClient created from the constructor above.
Thanks,
Vipul.