[ 
https://issues.apache.org/jira/browse/CAMEL-7247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15155531#comment-15155531
 ] 

Claus Ibsen commented on CAMEL-7247:
------------------------------------

To ensure some consistent UUID for the mail message you would need to plugin 
some or calculate some hash of the message. There is no UUID in the mail api. 
Though maybe the mail server has some uuid header you can use.

> No way to 'abort' the onCompletion action of the MailConsumer
> -------------------------------------------------------------
>
>                 Key: CAMEL-7247
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7247
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-mail
>    Affects Versions: 2.12.2
>            Reporter: Matt Nathan
>             Fix For: 2.17.0
>
>
> I have a route that reads from an email inbox, passes the message through a 
> distributed IdempotentConsumer and then processes the mail if it's not been 
> seen before.
> The reason I have this setup is because we are running multiple instances of 
> camel all pointing to the same inbox and don't want mails to be processed 
> more than once across the cluster.
> Now leaving aside the fact that this may not be the best way to achieve what 
> we want to do, the issue I have is that when the route completes, either by 
> 'aborting' as part of the IdempotentConsumer filtering or by processing the 
> mail successfully, the completion listener added by the MailComponent always 
> gets called.
> This is not ideal because it effectively disables any rollback or 
> reprocessing logic that may exist, and was even more problematic for us as we 
> had delete=true set on the MailConsumer, which meant mails were removed under 
> the feet of the node that was actually processing the mail.
> What I'd like is a way for the route to complete successfully but for the 
> MailComponent to not do anything to the mail. A state which is currently 
> impossible without overriding the mail component (it either marks as deleted 
> or marks as read, there is no 'don't do anything' option)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to