Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3436

Support Prioritization Of Messages Pending Dispatch

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.5.0
    • 5.6.0
    • Broker
    • None
    • Patch Available

    Description

      ActiveMQ does not deliver messages in priority order when the following conditions are true:

      1. A consumer has prefetch set to one (or zero).
      2. The consumer is created (consumerSession.createConsumer) prior to message delivery
      3. Large maxPageSize is configured

      The fix is to modify org.apache.activemq.broker.region.Queue to use a PrioritizationPendingList for the message in "pagedInPendingDispatch" so they are dispatched in priority order.

      A test case reproducing the issue is included.
      The patched file deltas are included.

      Attachments

        1. AMQPriorityTest.java
          7 kB
          Kevin Urciolo
        2. OrderedPendingList.java-patch.txt
          1 kB
          Kevin Urciolo
        3. PendingList.java-patch.txt
          0.9 kB
          Kevin Urciolo
        4. PrioritizedPendingList.java-patch.txt
          1 kB
          Kevin Urciolo
        5. Queue.java-patch.txt
          11 kB
          Kevin Urciolo

        Activity

          People

            tabish Timothy A. Bish
            urciolo1 Kevin Urciolo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: