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

Allow multiple slow consumer strategies to be used together

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • 5.9.0
    • None
    • Broker
    • None

    Description

      AMQ-378 allowed a pluggable policy for aborting consumers that were slow, where a consumer was slow if the broker was holding a number of messages for it equal to the consumer's prefetch buffer size, in addition to the same number of messages already in the consumer's prefetch buffer. AMQ-4621 added the ability to use a different slow consumer strategy and provided one other strategy, to consider a consumer slow if it hasn't acked a message in a certain amount of time.

      These strategies each has certain things it protects well against while not protecting against others, but I want the ability to be protected from all of them, by being able to select multiple SlowConsumerStrategy implementations for my needs. This would also allow us to use future SlowConsumerStrategy implementations (e.g. AMQ-5361) alongside the two that exist today.

      This should be done by extracting from the SlowConsumerStrategy interface a SlowConsumerIdentificationStrategy interface that would determine which consumers were considered slow according to that strategy. We'd end up with two classers implementing SlowConsumerIdentificationStrategy (e.g. PendingMessagesSlowConsumerIdentificationStrategy and AckDelaySlowConsumerIdentificationStrategy), extracted from AbortSlowConsumerStrategy and AbortSlowAckConsumerStrategy, respectively. AbortSlowAckConsumerStrategy should go away (anything in it that doesn't belong in AckDelaySlowConsumerIdentificationStrategy belongs in AbortSlowConsumerStrategy or is already there e.g. the run() method), and AbortSlowConsumerStrategy should get a Set<SlowConsumerIdentificationStrategy> to allow multiple different SlowConsumerIdentificationStrategies to be used together. The union of the results of calling each SlowConsumerIdentificationStrategy's identifySlowConsumers() method should then be passed to abortSubscription().

      Attachments

        Activity

          People

            Unassigned Unassigned
            tbain98 Tim Bain
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: