activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1439870 - /activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
Date Tue, 29 Jan 2013 12:50:16 GMT
Author: gtully
Date: Tue Jan 29 12:50:15 2013
New Revision: 1439870

URL: http://svn.apache.org/viewvc?rev=1439870&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-4276 - remove sub from conduit lis immediatly or
weget duplicate remove avents as shown by org.apache.activemq.usecases.TwoBrokerQueueSendReceiveTest

Modified:
    activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java

Modified: activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java?rev=1439870&r1=1439869&r2=1439870&view=diff
==============================================================================
--- activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
(original)
+++ activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
Tue Jan 29 12:50:15 2013
@@ -804,6 +804,10 @@ public abstract class DemandForwardingBr
                         + " for remote " + sub.getRemoteInfo().getConsumerId());
             }
 
+            // ensure not available for conduit subs pending removal
+            subscriptionMapByLocalId.remove(sub.getLocalInfo().getConsumerId());
+            subscriptionMapByRemoteId.remove(sub.getRemoteInfo().getConsumerId());
+
             // continue removal in separate thread to free up this thread for outstanding
responses
             // serialise with removeDestination operations so that removeSubs are serialised
with removeDestinations
             // such that all removeSub advisories are generated
@@ -815,9 +819,6 @@ public abstract class DemandForwardingBr
                         localBroker.oneway(sub.getLocalInfo().createRemoveCommand());
                     } catch (IOException e) {
                         LOG.warn("failed to deliver remove command for local subscription,
for remote " + sub.getRemoteInfo().getConsumerId(), e);
-                    } finally {
-                        subscriptionMapByLocalId.remove(sub.getLocalInfo().getConsumerId());
-                        subscriptionMapByRemoteId.remove(sub.getRemoteInfo().getConsumerId());
                     }
                 }
             });



Mime
View raw message