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

Allow administrators to choose wether emails should be re-sent synchronously or asynchronously

    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 MailResenderListener is to use MailResender#sendAsynchronously() to resend emails upon application startup.

      This can bring some issues as #sendAsynchronously() will then create a mail queue with every email to be resent, which can take a lot of space in the server memory (see XWIKI-16317).

      Recent improvements as part of XWIKI-16309 allow to cap the mail queue, limiting its impact on the server memory, however, when the wiki needs to resend 10k emails, the only option is to raise mail.sender.prepareQueueCapacity and mail.sender.sendQueueCapacity accordingly beforehand.

      One solution allowing to not go through this memory issue is to resend emails synchronously. The emails will then be prepared and sent one by one (instead of being all prepared at the same time, then all sent at the same time), which won't raise the issue that we have with the memory footprint of the mail queues.

      Ideally, this configuration could be editable either through the server configuration files or through the wiki administration.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: