mirror of https://github.com/apache/activemq.git
monitor connection splits is now on by default
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@636930 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ba3e913daf
commit
5dc188eb32
|
@ -164,7 +164,7 @@ public class BrokerService implements Service {
|
||||||
private int producerSystemUsagePortion = 60;
|
private int producerSystemUsagePortion = 60;
|
||||||
private int consumerSystemUsagePortion = 40;
|
private int consumerSystemUsagePortion = 40;
|
||||||
private boolean splitSystemUsageForProducersConsumers;
|
private boolean splitSystemUsageForProducersConsumers;
|
||||||
private boolean monitorConnectionSplits;
|
private boolean monitorConnectionSplits=true;
|
||||||
private int taskRunnerPriority = Thread.NORM_PRIORITY;
|
private int taskRunnerPriority = Thread.NORM_PRIORITY;
|
||||||
private boolean dedicatedTaskRunner;
|
private boolean dedicatedTaskRunner;
|
||||||
private boolean cacheTempDestinations=true;//useful for failover
|
private boolean cacheTempDestinations=true;//useful for failover
|
||||||
|
|
|
@ -49,25 +49,27 @@ public class ConnectionSplitBroker extends BrokerFilter{
|
||||||
if (info.isNetworkSubscription()) {
|
if (info.isNetworkSubscription()) {
|
||||||
networkConsumerList.add(info);
|
networkConsumerList.add(info);
|
||||||
} else {
|
} else {
|
||||||
List<ConsumerInfo> gcList = new ArrayList<ConsumerInfo>();
|
if(!networkConsumerList.isEmpty()) {
|
||||||
for (ConsumerInfo nc : networkConsumerList) {
|
List<ConsumerInfo> gcList = new ArrayList<ConsumerInfo>();
|
||||||
if (!nc.isNetworkConsumersEmpty()) {
|
for (ConsumerInfo nc : networkConsumerList) {
|
||||||
for (ConsumerId id : nc.getNetworkConsumerIds()) {
|
if (!nc.isNetworkConsumersEmpty()) {
|
||||||
if (id.equals(info.getConsumerId())) {
|
for (ConsumerId id : nc.getNetworkConsumerIds()) {
|
||||||
nc.removeNetworkConsumerId(id);
|
if (id.equals(info.getConsumerId())) {
|
||||||
if (nc.isNetworkConsumersEmpty()) {
|
nc.removeNetworkConsumerId(id);
|
||||||
gcList.add(nc);
|
if (nc.isNetworkConsumersEmpty()) {
|
||||||
|
gcList.add(nc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
gcList.add(nc);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
gcList.add(nc);
|
|
||||||
}
|
}
|
||||||
}
|
for (ConsumerInfo nc : gcList) {
|
||||||
for (ConsumerInfo nc : gcList) {
|
networkConsumerList.remove(nc);
|
||||||
networkConsumerList.remove(nc);
|
super.removeConsumer(context, nc);
|
||||||
super.removeConsumer(context, nc);
|
LOG.warn("Removed stale network consumer " + nc);
|
||||||
LOG.warn("Removed stale network consumer" + nc);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue