[ 
https://issues.apache.org/jira/browse/CAMEL-26785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18141293#comment-18141293
 ] 

Claus Ibsen commented on CAMEL-26785:
-------------------------------------

PR: https://github.com/apache/camel/pull/29490

Confirmed by a test: without the fix the processors of a route with a fallback 
were [breaker, to1, supplier]. The fix walks the onFallback outputs in 
JmxManagementLifecycleStrategy.registerPerformanceCounters.

_Claude Code on behalf of davsclaus_

> camel-management - the steps of a circuit breaker's onFallback have no 
> processor MBean, so they are missing from the route's processors and their 
> statistics
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26785
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26785
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-management
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.24.0
>
>
> The steps inside the {{onFallback}} of a circuit breaker get no processor 
> MBean. They are missing wherever the processors of a route are listed: JMX, 
> the route dev console with {{processors=true}}, {{camel get processor}}, and 
> the Routes tab of the Camel TUI. The fallback steps are exactly the ones that 
> run during an outage.
> Example (the {{fail-well/circuit-breaker}} example): route {{stock-check}} 
> has {{circuitBreaker1}} with {{to1}} in its steps and a {{choice1}} with 
> {{setBody1}} and {{setBody2}} in its {{onFallback}}. The route console lists 
> only:
> {noformat}
> stock-check ['circuitBreaker1', 'to1', 'log1']
> {noformat}
> The fallback steps are created (the startup recorder shows {{choice1 Create 
> processor}}, {{setBody1 Create processor}}), and errors in them are reported 
> under {{stock-check}} since CAMEL-26750.
> Cause: {{JmxManagementLifecycleStrategy.registerPerformanceCounters}} walks a 
> definition's {{getOutputs()}} (and, since CAMEL-24988, the destinations of a 
> {{SwitchDefinition}}). The fallback of a {{CircuitBreakerDefinition}} is not 
> one of its outputs, so no performance counter is registered for its steps, 
> and no processor MBean is made for them.
> Suggested fix: also walk {{CircuitBreakerDefinition.getOnFallback()}} there, 
> with a test in camel-management that the fallback steps are among the 
> processors of the route (Resilience4j and MicroProfile Fault Tolerance share 
> the model). Other EIPs that keep steps outside {{getOutputs()}} may have the 
> same gap.
> Found while walking the Camel TUI; the cause is from reading the code, not 
> yet confirmed by a test.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to