mirror of https://github.com/apache/activemq.git
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
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1439870 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ef24cc9a04
commit
bf787569d2
|
@ -804,6 +804,10 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, Br
|
|||
+ " 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 DemandForwardingBridgeSupport implements NetworkBridge, Br
|
|||
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());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue