Matt Nathan created CAMEL-7247:
----------------------------------
Summary: 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 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)