activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject [2/2] activemq git commit: AMQ-5875 - rework the patch a bit to only call createDemandSubscription when we have a match to avoid trcking state in error via the bridge subscriptionMap* from configureDemandSubscription
Date Fri, 17 Jul 2015 15:57:28 GMT
AMQ-5875 - rework the patch a bit to only call createDemandSubscription when we have a match
to avoid trcking state in error via the bridge subscriptionMap* from configureDemandSubscription


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

Branch: refs/heads/master
Commit: a439a0c6bf693e3fd68dcb190d22187c53ec8e9f
Parents: 2117768
Author: gtully <gary.tully@gmail.com>
Authored: Fri Jul 17 16:56:22 2015 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Fri Jul 17 16:56:22 2015 +0100

----------------------------------------------------------------------
 .../apache/activemq/network/DurableConduitBridge.java   | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/a439a0c6/activemq-broker/src/main/java/org/apache/activemq/network/DurableConduitBridge.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/network/DurableConduitBridge.java
b/activemq-broker/src/main/java/org/apache/activemq/network/DurableConduitBridge.java
index afcb42d..b4d04f6 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/network/DurableConduitBridge.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/network/DurableConduitBridge.java
@@ -61,23 +61,19 @@ public class DurableConduitBridge extends ConduitBridge {
         if (dests != null) {
             for (ActiveMQDestination dest : dests) {
                 if (isPermissableDestination(dest) && !doesConsumerExist(dest)) {
-                    DemandSubscription sub = createDemandSubscription(dest);
-                    sub.setStaticallyIncluded(true);
                     try {
                         //Filtering by non-empty subscriptions, see AMQ-5875
                         if (dest.isTopic()) {
-                            sub.getLocalInfo().setSubscriptionName(getSubscriberName(dest));
+                            String candidateSubName = getSubscriberName(dest);
                             for (Subscription subscription : this.getRegionSubscriptions(dest))
{
-                                String clientId = subscription.getContext().getClientId();
                                 String subName = subscription.getConsumerInfo().getSubscriptionName();
-                                if (clientId != null && clientId.equals(sub.getLocalInfo().getClientId())
-                                        && subName != null && subName.equals(sub.getLocalInfo().getSubscriptionName()))
{
+                                if (subName != null && subName.equals(candidateSubName))
{
+                                    DemandSubscription sub = createDemandSubscription(dest);
+                                    sub.setStaticallyIncluded(true);
                                     addSubscription(sub);
                                     break;
                                 }
                             }
-                        } else {
-                            addSubscription(sub);
                         }
                     } catch (IOException e) {
                         LOG.error("Failed to add static destination {}", dest, e);


Mime
View raw message