[
https://issues.apache.org/jira/browse/CAMEL-26881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-26881 started by shashank.
----------------------------------------
> camel-core - Aggregate EIP: an Error of the aggregation strategy or
> repository stops the completion timeout, interval or recover task for good
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-26881
> URL: https://issues.apache.org/jira/browse/CAMEL-26881
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Reporter: shashank
> Assignee: shashank
> Priority: Minor
>
> Follow-up of CAMEL-26741: another place that catches only {{Exception}},
> found while going through the follow-ups of that change. The completion
> timeout checker of the Aggregate EIP runs on {{DefaultTimeoutMap}}: a task
> scheduled with {{scheduleWithFixedDelay}} purges the expired entries and
> calls the listener of the aggregator ({{AggregationTimeoutMap.onEviction}}),
> which completes the group and calls {{AggregationStrategy.timeout}} and
> {{onCompletion}}. Three places catch only {{Exception}}: {{onEviction}},
> {{DefaultTimeoutMap.emitEvent}} and the purge task. So an {{Error}} that is
> not a {{VirtualMachineError}} (such as an {{AssertionError}} or a
> {{NoClassDefFoundError}} of the strategy) escapes the purge task, the
> executor does not run the task again (the {{Error}} stays in its
> {{ScheduledFuture}}, which nothing reads, so nothing is logged), and no group
> of that aggregator completes by its timeout again until the route is
> restarted; the other entries that expired in the same purge are already
> removed from the timeout map and are not completed either.
> Expected: as after CAMEL-26741, such an {{Error}} is handled as an exception:
> {{onEviction}} logs it and tries again as for an exception (CAMEL-25709), and
> the timeout map catches it per listener and per purge, so the other entries
> and the next purges go on; the completion interval and recover tasks log it
> and go on, as for an exception; a {{VirtualMachineError}} is left as before.
> The other users of {{DefaultTimeoutMap}} (camel-jms, camel-sjms,
> camel-rocketmq, camel-netty) have the same gap. The completion interval task
> ({{AggregationIntervalTask}}, {{scheduleAtFixedRate}}) and the recover task
> of the Aggregate EIP also catch only {{Exception}} and are stopped for good
> by such an {{Error}} (for example of {{onCompletion}});
> {{TimerListenerManager}} has the same gap (left for a follow-up).
> Not changed: a group whose {{timeout}} throws is handled as for an exception
> (it was removed from the repository before {{timeout}} is called: not
> delivered with a repository that is not recoverable, recovered later with a
> recoverable one).
> _Filed with Claude Code on behalf of allthingssecurity._
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)