activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject git commit: https://issues.apache.org/jira/browse/AMQ-4621 - remove check for the inflight size, as ignoreIdleConsumers=true should do the work
Date Mon, 16 Sep 2013 14:23:36 GMT
Updated Branches:
  refs/heads/trunk 269d44cfd -> a69379d5f


https://issues.apache.org/jira/browse/AMQ-4621 - remove check for the inflight size, as ignoreIdleConsumers=true
should do the work


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/a69379d5
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/a69379d5
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/a69379d5

Branch: refs/heads/trunk
Commit: a69379d5fb72fe3ac5fff8e8c1dccdeac20071dd
Parents: 269d44c
Author: Dejan Bosanac <dejan@nighttale.net>
Authored: Mon Sep 16 16:23:24 2013 +0200
Committer: Dejan Bosanac <dejan@nighttale.net>
Committed: Mon Sep 16 16:23:24 2013 +0200

----------------------------------------------------------------------
 .../broker/region/policy/AbortSlowAckConsumerStrategy.java      | 5 -----
 .../broker/region/policy/AbortSlowConsumerStrategy.java         | 4 ++--
 2 files changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/a69379d5/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowAckConsumerStrategy.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowAckConsumerStrategy.java
b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowAckConsumerStrategy.java
index b9dd9f8..5e538c7 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowAckConsumerStrategy.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowAckConsumerStrategy.java
@@ -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;
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/a69379d5/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowConsumerStrategy.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowConsumerStrategy.java
b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowConsumerStrategy.java
index 46f68d8..867d2b2 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowConsumerStrategy.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/AbortSlowConsumerStrategy.java
@@ -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());
                 }


Mime
View raw message