Hi,
How can I provide my own PoolingHttpClientConnectionManager to be used by flowable when executing HttpTask.
I want to implement custom http pooling.
Hey @prasanta,
You can achieve this by providing your own implementation of the FlowHttpClient
interface. You can create ApacheHttpComponentsFlowableHttpClient
by passing a builder that has a custom HttpClientConnectionManager
.
Cheers,
Filip
Hi @filiphr , thank you for the details.
However there is one challenge. When I created ApacheHttpComponentsFlowableHttpClient
and set it as processEngineConfiguration.getHttpClientConfig().setHttpClient(httpClient), after every request this httpClient is closed.
In ‘ApacheHttpComponentsFlowableHttpClient’ below code
`public HttpResponse call() {
try (CloseableHttpClient httpClient = clientBuilder.build()) {
try (CloseableHttpResponse response = httpClient.execute(request)) {
return toFlowableHttpResponse(response);
}
} catch (ClientProtocolException ex) { `
which marks the poolingHttpClientConnectionManager object as shutdown.
Did you mean to extend ApacheHttpComponentsFlowableHttpClient
and override above behaviour?