Uploaded image for project: 'HornetQ'
  1. HornetQ
  2. HORNETQ-705

Iteration witih multiple priorities can stop delivery on Bridge (and eventually consumers also).


    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 2.2.0.GA
    • Fix Version/s: 2.2.5.Final
    • Component/s: Core
    • Labels:


      Under sufficient load and using different priorities to publish messages, the bridge queue leaks messages that never seem to get delivered.

      The PriorityLinkedListImpl allows for concurrent iteration over a priority list. Howevever it is not thread safe. I was seeing that the instance of the prioritylinkedlistimpl was showing a size of 1 in the iterator, although all of the priority queues showed a size of 0. This was resolved with the synchronized access on the MUTEX variable.

      But this was not enough, I was still seeing the loop in the QueueImpl exit prematurely. This is because the hasNext() was returning false even though there was a member in one of the priority queues. This occurred when the member in the priority queue was at a priority less than the highest priority but greater than current index. It seems that the lastreset counter could not be incremented since the highest priority was too high, thus the iterator could not detect the new element in the list. This was resolved by incrementing lastreset everytime a new member is added.

        Gliffy Diagrams


            Issue Links



                • Assignee:
                  clebert.suconic Clebert Suconic
                  kisexton Kirk Sexton
                • Votes:
                  0 Vote for this issue
                  3 Start watching this issue


                  • Created: