Skip to content

Support maxRequests and maxRequestsPerHost client confiugrations#402

Merged
jimmyjames merged 1 commit intomasterfrom
max-retries-client-config
Feb 1, 2022
Merged

Support maxRequests and maxRequestsPerHost client confiugrations#402
jimmyjames merged 1 commit intomasterfrom
max-retries-client-config

Conversation

@jimmyjames
Copy link
Copy Markdown
Contributor

This change exposes to new networking client configuration points on the HttpOptions class:

  • setMaxRequests(int maxRequests), which defines the maximum requests that can be execute concurrently
  • setMaxRequestsPerHost(int max), which defines the maximum requests that can be executed per host.

These configurations just delegate to their respective configurations on OkHttp's Dispatcher.

(Note: While these changes are pretty simple to make, as a common configuration point we should consider supporting a pluggable http client later in the next major version of this library)

@jimmyjames jimmyjames added this to the v1-Next milestone Jan 31, 2022
@jimmyjames jimmyjames requested a review from a team as a code owner January 31, 2022 22:25
Copy link
Copy Markdown
Contributor

@evansims evansims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jimmyjames jimmyjames merged commit f8845c8 into master Feb 1, 2022
@jimmyjames jimmyjames modified the milestones: v1-Next, 1.38.0 Feb 1, 2022
@jimmyjames jimmyjames mentioned this pull request Feb 1, 2022
@evansims evansims deleted the max-retries-client-config branch July 5, 2022 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants