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

SimplePriorityMessageDispatchChannel.clear() needs to reset size attribute

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.8.0
    • 5.9.0
    • JMS client
    • None
    • Patch Available

    Description

      SimplePriorityMessageDispatchChannel.clear() deletes all prefetched messages but does not reset the size counter. The other method removeAll() does it correctly.

      Propose to fix this as follows:

      SimplePriorityMessageDispatchChannel.java
          public void clear() {
              synchronized (mutex) {
                  for (int i = 0; i < MAX_PRIORITY; i++) {
                      lists[i].clear();
                  }
      	    size = 0;
              }
          }
      

      Attachments

        Activity

          People

            tabish Timothy A. Bish
            tmielke Torsten Mielke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: