Uploaded image for project: 'Qpid JMS'
  1. Qpid JMS
  2. QPIDJMS-544

JmsDefaultPrefetchPolicy#getMaxPrefetchLimit logs incorrect MAX_PREFETCH_SIZE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.0.0, 1.1.0
    • 1.2.0, 0.60.1
    • qpid-jms-client
    • None

    Description

      When using the `JmsDefaultPrefetchPolicy` and setting a prefetch limit, prefetch values greater than the `maxPrefetchSize` are logged as being reset to the `MAX_PREFETCH_SIZE`. I believe `MAX_PREFETCH_SIZE` should be changed to `maxPrefetchSize`.

       

       

      private int getMaxPrefetchLimit(int value) {
          int result = Math.min(value, maxPrefetchSize);
          if (result < value) {
              LOG.warn("maximum prefetch limit has been reset from " + value + " to " + MAX_PREFETCH_SIZE);
          }
          return result;
      }

       

       

      private int getMaxPrefetchLimit(int value) {
          int result = Math.min(value, maxPrefetchSize);
          if (result < value) {
              LOG.warn("maximum prefetch limit has been reset from " + value + " to " + maxPrefetchSize);
          }
          return result;
      }

       

       

      Attachments

        Activity

          People

            robbie Robbie Gemmell
            axrs Alexander Scott
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: