[ 
https://issues.apache.org/jira/browse/CAMEL-24994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-24994.
---------------------------------
    Fix Version/s: 4.23.0
       Resolution: Fixed

Done in https://github.com/apache/camel/pull/26850 (merged 2026-09-26), in 
Camel 4.23.0.

_Claude Code on behalf of Claus Ibsen_

> camel-core - Enrich and Poll Enrich EIPs: the resource on completions are 
> lost when the enrich fails
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-24994
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24994
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.23.0
>
>
> A deep review of the Content Enricher EIPs (enrich / Enricher and pollEnrich 
> / PollEnricher) found the bug below in both. It was reproduced against 
> 4.23.0-SNAPSHOT.
> *The on completions of the resource exchange are lost when the enrich fails.* 
> The on completions (synchronizations) registered on the resource exchange 
> only ran when the enrichment succeeded. When the resource failed, or when the 
> aggregation strategy threw an exception, they never ran.
> * pollEnrich from a file: when the aggregation failed, the polled file's on 
> completion (commit/rollback, and removal from the in-progress repository) did 
> not run. So the file stayed marked as in progress, and it was not polled 
> again until the application was restarted.
> * enrich: when the enrich failed, the on completion that a producer registers 
> to release a resource did not run. The http producer, for example, closes the 
> response stream this way.
> When the resource was used (aggregated, or discarded by the aggregation 
> strategy), its on completions are handed over to run together with the 
> original exchange. When the resource or the aggregation failed, they now run 
> right away as failed, so a polled file is rolled back and can be polled 
> again. They are not handed over on the failure paths, as the exchange may 
> still recover (for example by redelivery), and a file whose content was never 
> used would then be committed.
> _Claude Code on behalf of Claus Ibsen_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to