Running into a wall with the Java SDK v10. We’re spinning up threads to fetch queue stats via /api/v2/analytics/queues/realtime, but the HttpClient inside the PlatformClient keeps dropping connections. Thought I’d set up a proper pool, but it’s not sticking.
HttpClientBuilder builder = HttpClientBuilder.create();
builder.setMaxConnTotal(200);
builder.setMaxConnPerRoute(50);
CloseableHttpClient client = builder.build();
// Trying to inject or override
PlatformClient.setHttpClient(client);
The docs are sparse on thread safety. Getting java.util.concurrent.TimeoutException after about 50 concurrent calls. Is PlatformClient even designed for this? Or am I missing a config flag? The pool settings seem to reset or ignore the max per route. Just need it to not crash during peak hours.