Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10254

Error may still block mail-consumer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.15.3, 2.17.3
    • 2.17.4, 2.18.0
    • camel-mail
    • None
    • Novice

    Description

      If an error occurs before routing an email (email corrupt), the consumer blocks and does not process further emails. A similar issue was fixed with CAMEL-7474, but the issue still exists at another location.

      CAMEL-7474 introduced a parameter "skipFailedMessage", which is used in Line 291 of the MailConsumer. If an error occurs in "createExchanges" (Line 128) the parameter is not evaluated.

      Example stacktrace:

      2016.08.19 10:10:35.613 DEBUG Camel (camel-1) thread #52 - pop3s://dev1@dev.de) Error populating the initial mail message attachments
      org.apache.camel.RuntimeCamelException: Error populating the initial mail message attachments
      	at org.apache.camel.component.mail.MailMessage.populateInitialAttachments(MailMessage.java:131)
      	at org.apache.camel.impl.DefaultMessage.createAttachments(DefaultMessage.java:216)
      	at org.apache.camel.impl.DefaultMessage.getAttachments(DefaultMessage.java:281)
      	at org.apache.camel.component.mail.MailConsumer.createExchanges(MailConsumer.java:328)
      	at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:121)
      	at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
      	at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: javax.mail.MessagingException: Missing start boundary
      	at javax.mail.internet.MimeMultipart.parsebm(MimeMultipart.java:882)
      	at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:503)
      	at javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:244)
      	at org.apache.camel.component.mail.MailBinding.extractAttachmentsFromMultipart(MailBinding.java:304)
      	at org.apache.camel.component.mail.MailBinding.extractAttachmentsFromMail(MailBinding.java:293)
      	at org.apache.camel.component.mail.MailMessage.populateInitialAttachments(MailMessage.java:128)
      	... 13 more
      

      Results are the same as described in CAMEL-7474

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              Neffez Steffen Eitelmann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: