You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Matt Nathan (JIRA)" <ji...@apache.org> on 2014/02/27 15:19:24 UTC

[jira] [Commented] (CAMEL-7247) No way to 'abort' the onCompletion action of the MailConsumer

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

Matt Nathan commented on CAMEL-7247:
------------------------------------

Just had a thought that it would also be ok if you added an inProgressRepository property to the mail consumer, like you have in the GenericFileConsumer style classes.

> 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
>
> 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.1.5#6160)