mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-4621 - remove check for the inflight size, as ignoreIdleConsumers=true should do the work
This commit is contained in:
parent
269d44cfdd
commit
a69379d5fb
|
@ -118,11 +118,6 @@ public class AbortSlowAckConsumerStrategy extends AbortSlowConsumerStrategy {
|
|||
continue;
|
||||
}
|
||||
|
||||
// don't mark consumers with no messages
|
||||
if (subscriber.getInFlightSize() <= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
long lastAckTime = subscriber.getTimeOfLastMessageAck();
|
||||
long timeDelta = System.currentTimeMillis() - lastAckTime;
|
||||
|
||||
|
|
|
@ -93,8 +93,8 @@ public class AbortSlowConsumerStrategy implements SlowConsumerStrategy, Runnable
|
|||
HashMap<Subscription, SlowConsumerEntry> toAbort = new HashMap<Subscription, SlowConsumerEntry>();
|
||||
for (Entry<Subscription, SlowConsumerEntry> entry : slowConsumers.entrySet()) {
|
||||
if (entry.getKey().isSlowConsumer()) {
|
||||
if (maxSlowDuration > 0 && (entry.getValue().markCount * checkPeriod > maxSlowDuration)
|
||||
|| maxSlowCount > 0 && entry.getValue().slowCount > maxSlowCount) {
|
||||
if (maxSlowDuration > 0 && (entry.getValue().markCount * checkPeriod >= maxSlowDuration)
|
||||
|| maxSlowCount > 0 && entry.getValue().slowCount >= maxSlowCount) {
|
||||
toAbort.put(entry.getKey(), entry.getValue());
|
||||
slowConsumers.remove(entry.getKey());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue