Class AbortSlowAckConsumerStrategy

    • Method Detail

      • getMaxTimeSinceLastAck

        public long getMaxTimeSinceLastAck()
        Gets the maximum time since last Ack before a subscription is considered to be slow.
        Returns:
        the maximum time since last Ack before the consumer is considered to be slow.
      • setMaxTimeSinceLastAck

        public void setMaxTimeSinceLastAck​(long maxTimeSinceLastAck)
        Sets the maximum time since last Ack before a subscription is considered to be slow.
        Parameters:
        maxTimeSinceLastAck - the maximum time since last Ack (mills) before the consumer is considered to be slow.
      • isIgnoreIdleConsumers

        public boolean isIgnoreIdleConsumers()
        Returns whether the strategy is configured to ignore consumers that are simply idle, i.e consumers that have no pending acks (dispatch queue is empty).
        Returns:
        true if the strategy will ignore idle consumer when looking for slow consumers.
      • setIgnoreIdleConsumers

        public void setIgnoreIdleConsumers​(boolean ignoreIdleConsumers)
        Sets whether the strategy is configured to ignore consumers that are simply idle, i.e consumers that have no pending acks (dispatch queue is empty). When configured to not ignore idle consumers this strategy acks not only on consumers that are actually slow but also on any consumer that has not received any messages for the maxTimeSinceLastAck. This allows for a way to evict idle consumers while also aborting slow consumers.
        Parameters:
        ignoreIdleConsumers - Should this strategy ignore idle consumers or consider all consumers when checking the last ack time verses the maxTimeSinceLastAck value.