FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Java 8 Connection Reset (Cont'd) · Issue #68 · ActiveCampaign/postmark-java · GitHub

Java 8 Connection Reset (Cont'd) #68

Description

Hello!

We are still experiencing Connection Reset issues with the Pooling Manager as it stands today. I was wondering if y'all would be able to make an update to allow us to be able to set custom max total and default routes per connection within the HttpClient constructor.

Here is an example.

public HttpClient(Map<String, Object> headers, int connectTimeoutSeconds, int readTimeoutSeconds, int totalMaxConnections, int defaultConnectionMaxPerRoute) {
        this.headers = headers;
        this.clientConfigBuilder = RequestConfig
                .custom()
                .setConnectTimeout(Timeout.ofSeconds(connectTimeoutSeconds))
                .setConnectionRequestTimeout(Timeout.ofSeconds(connectTimeoutSeconds))
                .setConnectionKeepAlive(Timeout.ofSeconds(connectTimeoutSeconds))
                .setResponseTimeout(Timeout.ofSeconds(readTimeoutSeconds));

        this.connectionManager = new PoolingHttpClientConnectionManager();
        connectionManager.setMaxTotal(totalMaxConnections);
        connectionManager.setDefaultMaxPerRoute(defaultConnectionMaxPerRoute);

        this.client = HttpClients.custom().setConnectionManager(connectionManager).build();
  }

Thanks!

Allan

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL