camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] [Commented] (CAMEL-7247) No way to 'abort' the onCompletion action of the MailConsumer
Date Sat, 21 Mar 2015 11:47:38 GMT


Claus Ibsen commented on CAMEL-7247:

Yeah maybe some header or something you can set on the message to control what it should do
at the end.

> No way to 'abort' the onCompletion action of the MailConsumer
> -------------------------------------------------------------
>                 Key: CAMEL-7247
>                 URL:
>             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
> 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
> 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'

This message was sent by Atlassian JIRA

View raw message