shashank created CAMEL-26905:
--------------------------------
Summary: camel-core - an Error of the aggregation strategy of a
split or multicast, or of the iterator of a streaming split, leaves the
exchange inflight
Key: CAMEL-26905
URL: https://issues.apache.org/jira/browse/CAMEL-26905
Project: Camel
Issue Type: Bug
Components: camel-core
Reporter: shashank
Assignee: shashank
Follow-up of CAMEL-26741 (apache/camel#29525), from the list asked for in its
review; the processors with the same pattern are in CAMEL-26824, and the
transformers of a route contract and the transacted step in a separate JIRA.
These places still catch only {{Exception}}, so an {{Error}} that is not a
{{VirtualMachineError}} (an {{AssertionError}}, a {{LinkageError}}, a custom
{{Error}}) of user code is not set on the exchange:
* the tasks of {{MulticastProcessor.MulticastTask}} ({{run}},
{{aggregateCompleted}} and the other catches of the task): an {{Error}} of an
{{AggregationStrategy}} or of the iterator of a streaming split escapes from
the task (to the caller, or the worker of the reactive executor); with
{{parallelProcessing}} it is lost in a {{Future}} and the exchange may stay
inflight.
Expected: as for the adapters after CAMEL-26741, such an {{Error}} fails the
exchange, and a {{VirtualMachineError}} is left as before. The fix belongs in
the catches of {{MulticastTask}} (the worker cannot fail an exchange it does
not know about). Needs its own tests (parallel and streaming).
Found in the review of CAMEL-26741 and its follow-up; confirmed with tests on
the real classes (the exchange does not complete).
With {{synchronous=true}} (split, multicast, recipient list), CAMEL-26824
(apache/camel#29665) already covers one path: an {{Error}} of the aggregation
strategy leaves the task and the reactive executor and reaches the catch around
the await manager in {{MulticastProcessor.process}}, which now fails the
exchange (tested there with
{{synchronousSplitFailsTheExchangeWithAnErrorOfItsAggregationStrategy}}). The
default (asynchronous) mode, {{parallelProcessing}} and the streaming iterator
remain for this JIRA.
_Filed with Claude Code on behalf of allthingssecurity._
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)