Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-17916

Make the MailResenderListener re-send emails without blocking the application startup

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Solved By
    • Major
    • None
    • 8.4.6, 11.10.10
    • Mail
    • None
    • Unknown
    • N/A
    • N/A

    Description

      The current implementation of the DatabaseMailResenderListener.java re-sends emails in prepare state synchronously with the startup of the wiki.

      This implies that the XWiki instance will not be accessible until the resender listener finishes to send its emails. This can represent a long time especially if there are a lot of emails to resend or if there are some limitations on the number of messages to send per minute from the SMTP server to which XWiki connects.

      One solution to this issue would be to execute the resending process in a dedicated job, as stated in https://github.com/xwiki/xwiki-platform/blob/a820629b6b40ed858777a4ab6f56698ec2fe7a73/xwiki-platform-core/xwiki-platform-mail/xwiki-platform-mail-send/xwiki-platform-mail-send-storage/src/main/java/org/xwiki/mail/internal/MailResenderListener.java#L92 .

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              caubin Clément Aubin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: