Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-3291

Badly formatted mailqueue causes RabbitMQMailQueue to crash

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • master, 3.5.0
    • 3.6.0
    • Queue, rabbitmq
    • None

    Description

        1. Reproduction steps:

      Given a bad payload published on the mailQueue exchange
      Then the dequeuer will crash and stop any following dequeuing processing

        1. Consequences:

      This can be leveraged to knock down mail reception given only the right to publish messages to RabbitMQ.

      This can generate problems to users when upgrading with non-empty mailqueue upon MailReferenceDTO changes

        1. Alternatives

      To not be crashing, we actually need to handle the deserialization exception.

      Dropping the message would be a quick fix, but could result in data loss.

      A better alternative would be to leverage a dead-letter queue in order to enable to not abort processing, while keeping track of the failure, and allowing to resume its processing.

        1. Related issues

      We are considering improving the reliability of the distributed mailqueue component, and allow to drop all RabbitMQ content. To recover from such a situation, non-dequeued emails would be tracked using the Cassandra browsing projection, and requeued in a newly provisionned rabbitMQ.

      Given the ability to re-generate non - dequeued entries, dropping invalid rabbitMQ messages could be acceptable, as the admins will have the right tools to re-generate legitimate traffic.

      Attachments

        Activity

          People

            Unassigned Unassigned
            btellier Benoit Tellier
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: