camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jussi Nupponen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-9106) URI option mapMailMessage doesn't obey peek=true option
Date Sun, 30 Aug 2015 15:02:46 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-9106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jussi Nupponen updated CAMEL-9106:
----------------------------------
    Attachment: trace-fixed.log
                trace-bug.log
                MapMailMessagesBugRoute.java
                camel-mail.mapMailMessages-peek.patch

Patch, traces and example.

> 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