mirror of https://github.com/apache/activemq.git
Don't check connection splits for temporary destinations
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@637046 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bbd2e47dbd
commit
ceb7e1a86c
|
@ -23,6 +23,7 @@ import org.apache.activemq.broker.Broker;
|
||||||
import org.apache.activemq.broker.BrokerFilter;
|
import org.apache.activemq.broker.BrokerFilter;
|
||||||
import org.apache.activemq.broker.ConnectionContext;
|
import org.apache.activemq.broker.ConnectionContext;
|
||||||
import org.apache.activemq.broker.region.Subscription;
|
import org.apache.activemq.broker.region.Subscription;
|
||||||
|
import org.apache.activemq.command.ActiveMQDestination;
|
||||||
import org.apache.activemq.command.ConsumerId;
|
import org.apache.activemq.command.ConsumerId;
|
||||||
import org.apache.activemq.command.ConsumerInfo;
|
import org.apache.activemq.command.ConsumerInfo;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
@ -44,7 +45,9 @@ public class ConnectionSplitBroker extends BrokerFilter{
|
||||||
|
|
||||||
|
|
||||||
public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception{
|
public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception{
|
||||||
|
ActiveMQDestination dest = info.getDestination();
|
||||||
|
boolean validDestination = dest != null && !dest.isTemporary();
|
||||||
|
if (validDestination) {
|
||||||
synchronized (networkConsumerList) {
|
synchronized (networkConsumerList) {
|
||||||
if (info.isNetworkSubscription()) {
|
if (info.isNetworkSubscription()) {
|
||||||
networkConsumerList.add(info);
|
networkConsumerList.add(info);
|
||||||
|
@ -73,6 +76,7 @@ public class ConnectionSplitBroker extends BrokerFilter{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return super.addConsumer(context, info);
|
return super.addConsumer(context, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue