Claus Ibsen created CAMEL-26729:
-----------------------------------
Summary: camel-core - a failure seen by an onException that does
not handle it counts as a redelivery
Key: CAMEL-26729
URL: https://issues.apache.org/jira/browse/CAMEL-26729
Project: Camel
Issue Type: Bug
Components: camel-core
Reporter: Claus Ibsen
Fix For: 4.24.0
A regression of CAMEL-26712 (#29380, on main only).
Since CAMEL-26712, ExchangeHelper.isRedelivered reads the redelivery counter of
the exchange first. When an onException (or the failure processor of another
error handler) takes over a failure without handling it,
RedeliveryErrorHandler.decrementRedeliveryCounter() takes back the redelivery
it counted for the failed attempt in the CamelRedeliveryCounter and
CamelRedelivered headers, but not in the counter of the exchange. So the
exchange still reads as redelivered, and the route MBean counts a redelivery
that never happened.
Seen in CI: JMSTransactionIsTransactedRedeliveredIT fails with Redeliveries
expected 0 but was 2 (its transacted route has a TransactionErrorHandler and an
onException that does not handle the failure).
Fix: decrementRedeliveryCounter() also sets the counter of the exchange. Test:
ManagedFailureWithoutRedeliveryTest in camel-management.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)