Croway commented on PR #30226: URL: https://github.com/apache/camel/pull/30226#issuecomment-6946166873
Both points checked, and the branch is rebased on main (conflict only in the 4.24 upgrade guide). Client lifecycle: reproduced on the PR head. After `removeRoute` the endpoint is stopped but its client stays open, also with `hosts`. Five reloads of a route left 6 open clients, a context stop left the client open, and `toD` with `cacheSize=-1` left one per message. Fixed in 381d8eb24547: the endpoint remembers the client it created (in `resolveMongoConnection()`, so `initializeConnection()` is covered too), closes it in `doStop()` and creates a new one when started again. A client it did not create (`mongoConnection`, the component client, a registry bean) is never closed, as CAMEL-13125 requires. `MongoDbEndpointClientLifecycleTest` covers it (5 of its 6 tests fail without the commit), and the `@AfterEach` that closed clients in `MongoDbEndpointConnectionUriStringTest` is gone. Upgrade guide: the entry and the component page now say each such endpoint has its own client and pool, and how to share one client. _Claude Code on behalf of Federico Mariani_ -- 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]
