[
https://issues.apache.org/jira/browse/CAMEL-26461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-26461.
---------------------------------
Resolution: Fixed
Fixed by https://github.com/apache/camel/pull/29041 (merged to main as
0c158cbdb6f77e826782695164ba468bd8f753c5).
_Claude Code on behalf of Claus Ibsen (davsclaus)_
> camel-core - NoErrorHandler: an AsyncProcessor that throws hangs the exchange
> in a route with noErrorHandler()
> --------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-26461
> URL: https://issues.apache.org/jira/browse/CAMEL-26461
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Reporter: shashank
> Assignee: shashank
> Priority: Major
> Fix For: 4.24.0
>
>
> Follow-up of CAMEL-26430 and CAMEL-26445 (the {{SimpleTask}} of
> {{RedeliveryErrorHandler}}), named in CAMEL-26445.
> With {{errorHandler(noErrorHandler())}} the step is wrapped in
> {{NoErrorHandler}}, whose {{process(exchange, callback)}} calls
> {{output.process(exchange, wrappedCallback)}} with no try/catch. When the
> processor is an {{AsyncProcessor}} that throws from {{process(exchange,
> callback)}} instead of setting the exception on the exchange, the exception
> goes up to the work of the reactive executor that runs the step
> ({{Pipeline}}), {{DefaultReactiveExecutor}} logs it ({noformat}Error
> executing reactive work due to ... This exception is ignored.{noformat}) and
> drops it, and the callback is never called: the caller waits forever, with or
> without an asynchronous step before it. A plain {{Processor}} that throws
> does not hang (its converter catches it).
> *Proposal*
> * Catch an exception thrown by {{output.process}} before the callback was
> called, set it on the exchange and call the callback, with the same
> exactly-once rule as CAMEL-26430 and CAMEL-26445 (the takeover through the
> reactive executor after the work already queued there; a callback that comes
> after it is ignored with a WARN). {{NoErrorHandler}} allocates a callback per
> call already, so the flag can live there.
> * A throw after the callback is rethrown to the caller, as before; a callback
> called twice is ignored with a WARN.
> * The same applies to the producers of a recipient list, which are wrapped in
> a clone of the route's error handler.
> * Tests as for the {{SimpleTask}} (default, asynchronous step, transacted,
> controls with the callback called before the throw and queued on the reactive
> executor, a late callback from another thread), and a recipient list.
> _Filed with Claude Code on behalf of allthingssecurity._
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)