Claus Ibsen created CAMEL-26780:
-----------------------------------

             Summary: camel-core - Runtime endpoint registry counts the input 
hits of a route twice behind a circuit breaker, counts sub-exchanges, and never 
counts direct
                 Key: CAMEL-26780
                 URL: https://issues.apache.org/jira/browse/CAMEL-26780
             Project: Camel
          Issue Type: Bug
          Components: camel-core
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
             Fix For: 4.24.0


The runtime endpoint registry (extended mode, as the Camel CLI and its 
Endpoints view use) counts the input hits of a route on ExchangeCreatedEvent. 
That gives wrong numbers:

* A circuit breaker (resilience4j, fault tolerance) makes a copy of the 
exchange with its own unit of work, which fires an ExchangeCreatedEvent with 
the same from route and endpoint: the input of the route is counted twice per 
message. Seen with a timer route with a circuit breaker: 4358 timer hits for 
2205 exchanges.
* Split, multicast and recipient list sub-exchanges get their own unit of work 
as well and are counted as input hits of the route's endpoint (a file split 
into 100 counts 101 hits for the file).
* direct passes the same exchange into the next route, so no 
ExchangeCreatedEvent fires and the input hits of a route consuming from direct 
stay 0.

Count the input hits when an exchange enters the route through its consumer 
(RoutePolicy.onExchangeBegin), as the route's own exchange counter does. 
ExchangeCreatedEvent itself is unchanged (the events console still shows the 
sub-exchanges).

_Claude Code on behalf of davsclaus_



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

Reply via email to