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

   _Claude Code on behalf of davsclaus_
   
   [CAMEL-26781](https://issues.apache.org/jira/browse/CAMEL-26781). Stacked on 
#29476 (CAMEL-26780): retarget to `main` before #29476 is merged with its 
branch deleted; CI runs no build while it targets that branch.
   
   For an InOut consumer the runtime endpoint registry counts the reply as an 
out hit of the consumer's endpoint. It did so on `ExchangeCompletedEvent` / 
`ExchangeFailedEvent`, which also fire for exchanges that are no reply: the 
circuit breaker completes its copy in its own unit of work 
(`UnitOfWorkHelper.doneUow(uow, copy)`), and so do the sub-exchanges of a 
Split, Multicast or Recipient List. They keep the pattern, from route and from 
endpoint, so they counted as replies too.
   
   The reply is now counted by the route policy of #29476, in `onExchangeDone`, 
in the route whose consumer created the exchange (the same key as before: the 
from route and the from endpoint). Copies are never done in the route, and a 
route the exchange came to over `direct` is not its from route, so neither 
counts. The completed and failed events still register the consumer's endpoint 
as an output of the route, also in the normal (not extended) mode, which has no 
route policy. The route policy is renamed `ConsumerHits`.
   
   Tests (failing before: split 8 replies instead of 2, multicast 3 instead of 
1, recipient list 6 instead of 2, circuit breaker 6 instead of 3):
   - `ManagedEndpointReplyHitsTest` (camel-management): InOut over seda with a 
split, a multicast, a recipient list, and a route called over direct (no reply 
of its own).
   - `ResilienceInputHitsTest#testOneReplyPerRequest` (camel-resilience4j).
   
   The upgrade guide note of #29476 now covers the replies too.
   
   🤖 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