activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject git commit: https://issues.apache.org/jira/browse/AMQ-4621
Date Wed, 11 Sep 2013 18:24:32 GMT
Updated Branches:
  refs/heads/trunk 77bcffc9b -> 8f8aa0f5e


https://issues.apache.org/jira/browse/AMQ-4621

Improve logging and configuration 

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

Branch: refs/heads/trunk
Commit: 8f8aa0f5e25070fe27b3aa583c60530286211c25
Parents: 77bcffc
Author: Timothy Bish <tabish121@gmai.com>
Authored: Wed Sep 11 14:24:29 2013 -0400
Committer: Timothy Bish <tabish121@gmai.com>
Committed: Wed Sep 11 14:24:29 2013 -0400

----------------------------------------------------------------------
 .../policy/AbortSlowAckConsumerStrategy.java     | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/8f8aa0f5/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 822e990..c026bb1 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
@@ -104,23 +104,19 @@ public class AbortSlowAckConsumerStrategy extends AbortSlowConsumerStrategy
{
     private void updateSlowConsumersList(List<Subscription> subscribers) {
         for (Subscription subscriber : subscribers) {
 
-            if (subscriber.getConsumerInfo().isNetworkSubscription()) {
+            if (isIgnoreNetworkSubscriptions() && subscriber.getConsumerInfo().isNetworkSubscription())
{
                 if (slowConsumers.remove(subscriber) != null) {
-                    LOG.info("sub: {} is no longer slow", subscriber.getConsumerInfo().getConsumerId());
-                    continue;
+                    LOG.info("network sub: {} is no longer slow", subscriber.getConsumerInfo().getConsumerId());
                 }
+                continue;
             }
 
             if (isIgnoreIdleConsumers() && subscriber.getDispatchedQueueSize() ==
0) {
                 // Not considered Idle so ensure its cleared from the list
                 if (slowConsumers.remove(subscriber) != null) {
-                    LOG.info("sub: {} is no longer slow", subscriber.getConsumerInfo().getConsumerId());
-                    continue;
-                } else {
-                    if (LOG.isTraceEnabled()) {
-                        LOG.trace("Not ignoring idle Consumer {}", subscriber.getConsumerInfo().getConsumerId());
-                    }
+                    LOG.info("idle sub: {} is no longer slow", subscriber.getConsumerInfo().getConsumerId());
                 }
+                continue;
             }
 
             long lastAckTime = subscriber.getTimeOfLastMessageAck();
@@ -146,12 +142,11 @@ public class AbortSlowAckConsumerStrategy extends AbortSlowConsumerStrategy
{
     private void abortAllQualifiedSlowConsumers() {
         HashMap<Subscription, SlowConsumerEntry> toAbort = new HashMap<Subscription,
SlowConsumerEntry>();
         for (Entry<Subscription, SlowConsumerEntry> entry : slowConsumers.entrySet())
{
-            if (getMaxSlowDuration() > 0 &&
-                (entry.getValue().markCount * getCheckPeriod() > getMaxSlowDuration())
||
+            if (getMaxSlowDuration() > 0 && (entry.getValue().markCount * getCheckPeriod()
> getMaxSlowDuration()) ||
                 getMaxSlowCount() > 0 && entry.getValue().slowCount > getMaxSlowCount())
{
 
                 if (LOG.isTraceEnabled()) {
-                    LOG.trace("Remove consumer {} from slow list: " +
+                    LOG.trace("Transferring consumer {} to the abort list: " +
                               "slow duration = " + entry.getValue().markCount * getCheckPeriod()
+ ", " +
                               "slow count = " + entry.getValue().slowCount,
                               entry.getKey().getConsumerInfo().getConsumerId());


Mime
View raw message