camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dietmaier (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-9106) URI option mapMailMessage doesn't obey peek=true option
Date Sun, 03 Jan 2016 10:53:39 GMT

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

Thomas Dietmaier commented on CAMEL-9106:
-----------------------------------------

Sehr geehrte Damen und Herren,

ich bin ab Mo. 4. 1. wieder im Hause und kann Ihre Nachricht erst dann bearbeiten. Ihre Nachricht
wird nicht weitergeleitet.

mfg
Thomas Dietmaier.



> URI option mapMailMessage doesn't obey peek=true option
> -------------------------------------------------------
>
>                 Key: CAMEL-9106
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9106
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 2.15.3
>            Reporter: Jussi Nupponen
>         Attachments: MapMailMessagesBugRoute.java, camel-mail.mapMailMessages-peek.patch,
trace-bug.log, trace-fixed.log
>
>
> URI option mapMailMessage=true as is the default with Mail Component fetches IMAP-messages
without peek=true option. This results to faulty rollback logic since in case of an exception
and rollback, messages are already marked with flag SEEN and won't be rolled back to UNSEEN.
> Messages are marked with peek-option in processBatch-method but mapping mail messages
to Camel messages happens before that method call in createExchanges-method.
> I've attached a patch where peek option is set to the messages already in the poll-method
which resolves the issue. Unfortunately I couldn't write a proper jUnit test for this scenario
since org.jvnet.mock_javamail.Mailbox doesn't seem to support marking messages as SEEN even
if they have been fetched.  However, I have attached traces of faulty and fixed run with a
test route (that route is also included).



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

Mime
View raw message