mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-3630 - NetworkBridgeFilterFactory should be assigned to Queue not NetworkBridge - thanks. the filter should be evaluated per destination
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1325735 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
53b29a206b
commit
90fcbc8812
|
@ -121,7 +121,7 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, Br
|
||||||
protected CountDownLatch localStartedLatch = new CountDownLatch(1);
|
protected CountDownLatch localStartedLatch = new CountDownLatch(1);
|
||||||
protected final AtomicBoolean lastConnectSucceeded = new AtomicBoolean(false);
|
protected final AtomicBoolean lastConnectSucceeded = new AtomicBoolean(false);
|
||||||
protected NetworkBridgeConfiguration configuration;
|
protected NetworkBridgeConfiguration configuration;
|
||||||
protected NetworkBridgeFilterFactory filterFactory;
|
protected final NetworkBridgeFilterFactory defaultFilterFactory = new DefaultNetworkBridgeFilterFactory();
|
||||||
|
|
||||||
protected final BrokerId remoteBrokerPath[] = new BrokerId[] {null};
|
protected final BrokerId remoteBrokerPath[] = new BrokerId[] {null};
|
||||||
protected Object brokerInfoMutex = new Object();
|
protected Object brokerInfoMutex = new Object();
|
||||||
|
@ -1188,18 +1188,14 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, Br
|
||||||
}
|
}
|
||||||
|
|
||||||
protected NetworkBridgeFilter createNetworkBridgeFilter(ConsumerInfo info) throws IOException {
|
protected NetworkBridgeFilter createNetworkBridgeFilter(ConsumerInfo info) throws IOException {
|
||||||
if (filterFactory == null) {
|
NetworkBridgeFilterFactory filterFactory = defaultFilterFactory;
|
||||||
if (brokerService != null && brokerService.getDestinationPolicy() != null) {
|
if (brokerService != null && brokerService.getDestinationPolicy() != null) {
|
||||||
PolicyEntry entry = brokerService.getDestinationPolicy().getEntryFor(info.getDestination());
|
PolicyEntry entry = brokerService.getDestinationPolicy().getEntryFor(info.getDestination());
|
||||||
if (entry != null) {
|
if (entry != null && entry.getNetworkBridgeFilterFactory() != null) {
|
||||||
filterFactory = entry.getNetworkBridgeFilterFactory();
|
filterFactory = entry.getNetworkBridgeFilterFactory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (filterFactory == null) {
|
return filterFactory.create(info, getRemoteBrokerPath(), configuration.getNetworkTTL());
|
||||||
filterFactory = new DefaultNetworkBridgeFilterFactory();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return filterFactory.create(info, getRemoteBrokerPath(), configuration.getNetworkTTL() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void serviceLocalBrokerInfo(Command command) throws InterruptedException {
|
protected void serviceLocalBrokerInfo(Command command) throws InterruptedException {
|
||||||
|
|
Loading…
Reference in New Issue