davsclaus opened a new pull request, #26859: URL: https://github.com/apache/camel/pull/26859
_Claude Code on behalf of Claus Ibsen (davsclaus)_ JIRA: https://issues.apache.org/jira/browse/CAMEL-25001 A review of the route lifecycle (`AbstractCamelContext`, `DefaultShutdownStrategy`, `DefaultSupervisingRouteController`) found the bug below. The fix has a test that fails without it. **An exhausted route stayed unhealthy after it was started manually.** When the supervising route controller cannot start a route and its back-off attempts run out, it keeps the route as exhausted (`getExhaustedRoutes()`). With `unhealthyOnExhausted=true`, `hasUnhealthyRoutes()` then reports the application as unhealthy, as intended. But when the route was then started manually once the cause was fixed (through JMX or the route controller), it was not removed from the exhausted routes. So it was still reported as exhausted, and the application stayed unhealthy: a readiness probe, for example, stayed DOWN although the route was running. A manual start or stop takes the route over from the supervisor. `RouteManager.release()` already cancels a pending restart and clears the last restart exception, and it now also removes the route from the exhausted routes. No outside PRs overlap. The outside contributor's #26795 (merged) changed `DefaultShutdownStrategy`, but not this controller. ### Reviewed without changes - **`AbstractCamelContext`** (start, stop, restart, suspend, resume, route start/stop/remove, component and endpoint resolution): no bugs. Two minor inconsistencies: - `addEndpoint` replacing an existing endpoint does not send `onEndpointRemove` for the old one. - `doSuspend` gives routes without an explicit startup order a new counter value on each suspend. Iteration still follows definition order, so the suspend order is unaffected. - **`DefaultShutdownStrategy`**: no bugs. One debug log message has its suspend and shutdown cases swapped ("shutdown deferred." when suspending). ### Tests - New `DefaultSupervisingRouteControllerExhaustedStartTest`: a route whose consumer fails to start until its attempts are exhausted, is then started manually, and must no longer be exhausted or unhealthy. It fails without the fix. - The full `core/camel-core` suite passes: 7590 tests, 0 failures, 44 skipped. So do the `*Supervising*` tests in camel-core and camel-main. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
