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-4758 - improve performance of pull consumers; more improvments; removed obsolete code and added extra check for dropped messages
Date Tue, 01 Oct 2013 12:08:03 GMT
Updated Branches:
  refs/heads/trunk 8550f9303 -> b8d5ca838


https://issues.apache.org/jira/browse/AMQ-4758 - improve performance of pull consumers; more
improvments; removed obsolete code and added extra check for dropped messages


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

Branch: refs/heads/trunk
Commit: b8d5ca8383c9dd6468e7fdf348d571cdc089fea6
Parents: 8550f93
Author: Dejan Bosanac <dejan@nighttale.net>
Authored: Tue Oct 1 14:07:22 2013 +0200
Committer: Dejan Bosanac <dejan@nighttale.net>
Committed: Tue Oct 1 14:07:49 2013 +0200

----------------------------------------------------------------------
 .../java/org/apache/activemq/broker/region/Queue.java   | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/b8d5ca83/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
index ee5bb2e..6f4e2fa 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
@@ -2009,10 +2009,8 @@ public class Queue extends BaseDestination implements Task, UsageListener
{
 
             MessageReference node = iterator.next();
             Subscription target = null;
-            int interestCount = 0;
             for (Subscription s : consumers) {
                 if (s instanceof QueueBrowserSubscription) {
-                    interestCount++;
                     continue;
                 }
                 if (!fullConsumers.contains(s)) {
@@ -2031,14 +2029,14 @@ public class Queue extends BaseDestination implements Task, UsageListener
{
                         LOG.trace("Subscription full {}", s);
                     }
                 }
-                // make sure it gets dispatched again
-                if (!node.isDropped()) {
-                    interestCount++;
-                }
+            }
+
+            if (target == null && node.isDropped()) {
+                iterator.remove();
             }
 
             // return if there are no consumers or all consumers are full
-            if (target == null && (consumers.size() == 0 || consumers.size() == fullConsumers.size()))
{
+            if (target == null && consumers.size() == fullConsumers.size()) {
                 return list;
             }
 


Mime
View raw message