davsclaus opened a new pull request, #29490:
URL: https://github.com/apache/camel/pull/29490

   _Claude Code on behalf of davsclaus_
   
   [CAMEL-26785](https://issues.apache.org/jira/browse/CAMEL-26785)
   
   The steps inside the `onFallback` of a circuit breaker got no processor 
MBean. So they were missing, with their statistics, from JMX, the route dev 
console (`processors=true`), `camel get processor` and the Routes tab of the 
TUI. Those are the steps that run while the protected service is down.
   
   **Cause:** `JmxManagementLifecycleStrategy.registerPerformanceCounters` 
walks the outputs of each definition, plus the destinations of a 
`SwitchDefinition` since CAMEL-24988. The fallback of a 
`CircuitBreakerDefinition` is not one of its outputs, so its steps got no 
performance counter, and without one no processor MBean is made.
   
   **Fix:** walk `CircuitBreakerDefinition.getOnFallback().getOutputs()` there 
too. The model is shared, so Resilience4j and MicroProfile Fault Tolerance both 
get it. A route with a circuit breaker and a fallback now has more processor 
MBeans than before.
   
   **Test:** `ResilienceFallbackManagementTest` puts a `choice` with two 
`setBody` steps in the fallback. It checks that they are among the processors 
of the route, that their route id is that route, and that they have their own 
exchange counts. It fails without the fix: the processors of the route were 
`[breaker, to1, supplier]`.
   
   The camel-resilience4j (97), camel-management (595) and 
camel-microprofile-fault-tolerance (43) tests pass. I also checked live with 
the `fail-well/circuit-breaker` example: Routes ▸ Processors now lists the 
fallback's `choice` (13) and its two `setBody` steps (10 rejected while open, 3 
failed calls).
   
   Found while walking the Camel TUI. #29486 (TUI) is independent of this PR.
   
   🤖 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]

Reply via email to