gnodet-bot commented on code in PR #28785:
URL: https://github.com/apache/camel/pull/28785#discussion_r4435002991
##########
core/camel-core-processor/src/main/java/org/apache/camel/processor/errorhandler/RedeliveryErrorHandler.java:
##########
@@ -1393,6 +1436,13 @@ protected void redeliver() {
// process the exchange (also redelivery)
processOutput(exchange, doneSync -> {
+ if (!continued.compareAndSet(false, true)) {
+ // the processor threw before it called the callback, and
the error handler took over that failure
+ LOG.warn("The callback of the redelivery of exchangeId: {}
was called after its processor {} had thrown an"
+ + " exception (an AsyncProcessor must not throw
from process). This callback is ignored.",
+ exchangeId, outputAsync);
+ return;
+ }
if (LOG.isTraceEnabled()) {
LOG.trace("Redelivering exchangeId: {}",
exchange.getExchangeId());
Review Comment:
Nit: this TRACE log still uses `exchange.getExchangeId()` while the new WARN
logs above use the captured `exchangeId` local. Please use `exchangeId` here
too for consistency.
```suggestion
LOG.trace("Redelivering exchangeId: {}", exchangeId);
```
<!-- gnodet-bot -->
--
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]