Uploaded image for project: 'A-MQ Broker'
  1. A-MQ Broker
  2. ENTMQBR-945

Non-persistent messages lost in non-failure scenarios when authorization fails, because delivery mode defaults to asynchronous

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Done
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: AMQ 7.0.3.GA
    • Fix Version/s: None
    • Component/s: broker-core
    • Labels:
      None
    • Environment:

      A-MQ 7.0.3 GA

    • Target Release:
    • Sprint:
      AMQ Broker 1833, AMQ Broker 1836, AMQ Broker 1839
    • Affects:
      Documentation (Ref Guide, User Guide, etc.)
    • Release Notes Text:
      Hide
      Clients may not notice the loss of non-persistent messages. Message loss is often associated with an obvious failure, such as the broker stopping or the storage provider disconnecting. However, the asynchronous behavior of the default delivery mode can lead to the loss of non-persistent messages in other situations too, such as failing authorization or trying to use a queue that is not configured.
      Show
      Clients may not notice the loss of non-persistent messages. Message loss is often associated with an obvious failure, such as the broker stopping or the storage provider disconnecting. However, the asynchronous behavior of the default delivery mode can lead to the loss of non-persistent messages in other situations too, such as failing authorization or trying to use a queue that is not configured.
    • Release Notes Docs Status:
      Documented as Known Issue

      Description

      With the Artemis client, non-persistent messages are delivered asynchronously to the A-MQ 7 broker. While this improves throughput, it increases the risk of messages being lost without the client noticing. There is a blockOnNonDurableSend configuration option which can be set to "true" to make the message delivery synchronous, so the client will be aware of the failure. The problem is that A-MQ administrators have no particular reason to set this option.

      With non-persistent messaging, there will always be a non-zero risk of messages being lost without the client noticing. However, in most cases message loss will be associated with an evident failure – a crash of the broker or loss of the storage provider, for example. The default asynchronous behaviour, however, raises the prospect of messages being lost in non-failure situations, where the administrator would be unaware that there was any need to take action.

      The example that led to this bug being raised was a misconfiguration in the authorization settings. Messages could not be delivered because the authorization settings were incorrect, but this went unnoticed from some time. While this is, to some extent, an avoidable failure, I am concerned that there are other situations that could lead to the same problem, that aren't directly attributable to an administrative oversight – storage exhausted, for example.

      Other message brokers don't necessarily treat persistent and non-persistent messages differently as regards error handling, so customers migrating from a different broker could introduce a problem of which they are unaware.

      In general, however, an enterprise product really ought to default to the most reliable operation, rather than the operation that provides the best throughput, if there is a conflict.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ataylor Andy Taylor
                  Reporter:
                  kboone Kevin Boone
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: