You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Bruno Gonçalves (Jira)" <ji...@apache.org> on 2026/01/14 12:09:00 UTC

[jira] [Comment Edited] (CAMEL-22855) Inconsistent Route Statistics for Consumer-Side Failures

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

Bruno Gonçalves edited comment on CAMEL-22855 at 1/14/26 12:08 PM:
-------------------------------------------------------------------

*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{}}}.


was (Author: JIRAUSER303582):
*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)