use of com.google.api.client.http.apache.ApacheHttpTransport in project camel by apache.
the class GooglePubsubConnectionFactory method getMultiThreadClient.
public Pubsub getMultiThreadClient(int parallelThreads) throws Exception {
PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager();
cm.setDefaultMaxPerRoute(parallelThreads);
cm.setMaxTotal(parallelThreads);
CloseableHttpClient httpClient = HttpClients.createMinimal(cm);
return buildClient(new ApacheHttpTransport(httpClient));
}
Aggregations