You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "shashank (Jira)" <ji...@apache.org> on 2026/10/17 12:55:00 UTC

[jira] [Work started] (CAMEL-25733) camel-mail - remove the idempotent key of the mail whose processExchange throws, not only of the rest of the batch

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

Work on CAMEL-25733 started by shashank.
----------------------------------------
> camel-mail - remove the idempotent key of the mail whose processExchange throws, not only of the rest of the batch
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-25733
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25733
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-mail
>            Reporter: shashank
>            Assignee: shashank
>            Priority: Minor
>
> Follow-up of CAMEL-25710 (raised in the review of https://github.com/apache/camel/pull/27990).
> With an {{idempotentRepository}}, CAMEL-25710 gives back the mails of a batch that are not routed, also when routing an exchange throws. The exchange that {{processExchange}} itself throws on is already taken from the queue, so its key stays in the repository and that mail is skipped as a duplicate until the key is removed. Only an unchecked exception escaping {{processExchange}} reaches this path (routing errors normally land on the exchange).
> Proposed change: in {{processBatch}}, catch the exception of {{processExchange}}, remove the key of that mail (when the exchange did not complete), and rethrow; with a test in {{MailIdempotentRepositoryPollErrorTest}}.
> _Filed with Claude Code on behalf of allthingssecurity._



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