oscerd commented on PR #26191: URL: https://github.com/apache/camel/pull/26191#issuecomment-5584731988
Thanks @gnodet — both fixed in 3e39974: 1. **HttpClient leak**: right, `java.net.http.HttpClient` isn't `AutoCloseable` before Java 21, so a per-instance client leaks its executor/selector threads on our Java 17 baseline. `OpaProducerHealthCheck` now uses a single shared `static final HttpClient`; the per-request URL and bearer token are set on the `HttpRequest`, so nothing endpoint-specific needs to live on the client and there is nothing to shut down. 2. **Health-check ID collision**: switched the id to `getEndpoint().getEndpointUri()`, which is unique within the context, so two endpoints sharing a policy path but pointing at different servers no longer register the same id (and `removeHealthCheck` can't clobber the wrong registration). camel-opa module tests stay green (28/28). _Claude Code on behalf of Andrea Cosentino_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
