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:
Dejan Bosanac 2013-09-16 16:23:24 +02:00
parent 269d44cfdd
commit a69379d5fb
2 changed files with 2 additions and 7 deletions

View File

@ -118,11 +118,6 @@ public class AbortSlowAckConsumerStrategy extends AbortSlowConsumerStrategy {
continue; continue;
} }
// don't mark consumers with no messages
if (subscriber.getInFlightSize() <= 0) {
continue;
}
long lastAckTime = subscriber.getTimeOfLastMessageAck(); long lastAckTime = subscriber.getTimeOfLastMessageAck();
long timeDelta = System.currentTimeMillis() - lastAckTime; long timeDelta = System.currentTimeMillis() - lastAckTime;

View File

@ -93,8 +93,8 @@ public class AbortSlowConsumerStrategy implements SlowConsumerStrategy, Runnable
HashMap<Subscription, SlowConsumerEntry> toAbort = new HashMap<Subscription, SlowConsumerEntry>(); HashMap<Subscription, SlowConsumerEntry> toAbort = new HashMap<Subscription, SlowConsumerEntry>();
for (Entry<Subscription, SlowConsumerEntry> entry : slowConsumers.entrySet()) { for (Entry<Subscription, SlowConsumerEntry> entry : slowConsumers.entrySet()) {
if (entry.getKey().isSlowConsumer()) { if (entry.getKey().isSlowConsumer()) {
if (maxSlowDuration > 0 && (entry.getValue().markCount * checkPeriod > maxSlowDuration) if (maxSlowDuration > 0 && (entry.getValue().markCount * checkPeriod >= maxSlowDuration)
|| maxSlowCount > 0 && entry.getValue().slowCount > maxSlowCount) { || maxSlowCount > 0 && entry.getValue().slowCount >= maxSlowCount) {
toAbort.put(entry.getKey(), entry.getValue()); toAbort.put(entry.getKey(), entry.getValue());
slowConsumers.remove(entry.getKey()); slowConsumers.remove(entry.getKey());
} }