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

Bruno Gonçalves commented on CAMEL-22855:
-----------------------------------------

*Additional Note:* This behavior is not limited to Consumer/Source failures. 
When an exception occurs during an *action step* within the route (e.g., a 
failing {{to("http://...";)}} or a processing {{{}bean{}}}), and that exception 
is caught by the same {{handled(true)}} policy, the statistics exhibit the same 
pattern: {{ExchangesCompleted}} increments, while {{ExchangesFailed}} remains 
{{{}0{}}}. The failure is only visible via the {{FailuresHandled}} JMX 
attribute.

> Inconsistent Route Statistics for Consumer-Side Failures
> --------------------------------------------------------
>
>                 Key: CAMEL-22855
>                 URL: https://issues.apache.org/jira/browse/CAMEL-22855
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-management
>    Affects Versions: 4.10.8
>            Reporter: Bruno Gonçalves
>            Priority: Major
>         Attachments: error-handler-reproducer.zip
>
>
> When a consumer (e.g., {{{}imaps{}}}) fails to connect and 
> {{bridgeErrorHandler=true}} is used in conjunction with a {{handled(true)}} 
> error policy, the {{ManagedRouteMBean}} statistics are misleading. The 
> failure is not counted in the {{ExchangesFailed}} metric, and the 
> {{ExchangesCompleted}} metric increments as if the business logic succeeded.
> Reproducer on attach.
>  
> {{--- CAMEL STATISTICS REPORT ---}}
> {{Route ID: imapRoute}}
> {{  - Total Exchanges:     1}}
> {{  - Completed:           1}}
> {{  - Failed (Unhandled):  0}}
> {{  - Failures Handled:    1 (from JMX)}}
> {{  - Ext. Redeliveries:   0 (from JMX)}}
> {{  => TOTAL LOGICAL FAILURES: 1}}
> {{--------------------------------}}
> {{Route ID: errorRoute2}}
> {{  - Total Exchanges:     1}}
> {{  - Completed:           1}}
> {{  - Failed (Unhandled):  0}}
> {{  - Failures Handled:    0 (from JMX)}}
> {{  - Ext. Redeliveries:   0 (from JMX)}}
> {{  => TOTAL LOGICAL FAILURES: 0}}
> {{--------------------------------}}
> {{Route ID: errorRoute3}}
> {{  - Total Exchanges:     1}}
> {{  - Completed:           1}}
> {{  - Failed (Unhandled):  0}}
> {{  - Failures Handled:    0 (from JMX)}}
> {{  - Ext. Redeliveries:   0 (from JMX)}}
> {{  => TOTAL LOGICAL FAILURES: 0}}
> {{--------------------------------}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to