Qpid
  1. Qpid
  2. QPID-3357

Broker should purge more aggressively before invoking queue limit policy

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: C++ Broker
    • Labels:
      None

      Description

      When enqueuing a message, the broker checks the message/byte count in the queue and ensures the new message will not violate the queue's limits and limit policy (reject, ring, etc). It does not take into account messages still in the queue that have expired, which could result in a message being dropped or the oldest message being removed unnecessarily. For example, create a queue with a max count of 2 messages. Send 1 message with no ttl. Send a 2nd message with a small ttl e.g. 1 second. Wait longer then the ttl so the 2nd message expires. Try to send a 3rd message to the queue. If the queue policy is reject, you will get an exception that the queue is full. If the queue policy is ring, it will discard the 1st message (no ttl so unexpired) to make room for the new message.

      One possible solution would be to try to purge expired messages more aggressively, e.g. when an enqueue would exceed the limit, try to purge any expired messages, and then re-check the limit.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Ken Giusti
            Reporter:
            Andy Goldstein
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development