maxmind / minfraud-api-java

Java API for minFraud Score, Insights, and Factors

Home Page:https://maxmind.github.io/minfraud-api-java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No possibility to override default HttpClientBuilder settings

mjancewicz opened this issue · comments

Motivation:

  • default HttpClient comes with defaultMaxPerRoute setting equal 2 which is a bottleneck for us
  • add monitor for org.apache.http.pool.PoolStats. We would like to know we hit the pool limits.

Currently we must go with reflection and override. Would be nice to do it properly.

I am a somewhat hesitant at exposing the the Apache HttpClient or HttpClientBuilder as part of the API as it will make it more difficult to migrate away from it in the future, e.g., to use java.net.http.HttpClient instead.

Increasing defaultMaxPerRoute would probably make sense generally. What value are you using?

We have 20, but we monitor it and will increase if necessary.