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:
Robert Davies 2008-03-14 00:04:32 +00:00
parent ba3e913daf
commit 5dc188eb32
2 changed files with 18 additions and 16 deletions

View File

@ -164,7 +164,7 @@ public class BrokerService implements Service {
private int producerSystemUsagePortion = 60;
private int consumerSystemUsagePortion = 40;
private boolean splitSystemUsageForProducersConsumers;
private boolean monitorConnectionSplits;
private boolean monitorConnectionSplits=true;
private int taskRunnerPriority = Thread.NORM_PRIORITY;
private boolean dedicatedTaskRunner;
private boolean cacheTempDestinations=true;//useful for failover

View File

@ -49,25 +49,27 @@ public class ConnectionSplitBroker extends BrokerFilter{
if (info.isNetworkSubscription()) {
networkConsumerList.add(info);
} else {
List<ConsumerInfo> gcList = new ArrayList<ConsumerInfo>();
for (ConsumerInfo nc : networkConsumerList) {
if (!nc.isNetworkConsumersEmpty()) {
for (ConsumerId id : nc.getNetworkConsumerIds()) {
if (id.equals(info.getConsumerId())) {
nc.removeNetworkConsumerId(id);
if (nc.isNetworkConsumersEmpty()) {
gcList.add(nc);
if(!networkConsumerList.isEmpty()) {
List<ConsumerInfo> gcList = new ArrayList<ConsumerInfo>();
for (ConsumerInfo nc : networkConsumerList) {
if (!nc.isNetworkConsumersEmpty()) {
for (ConsumerId id : nc.getNetworkConsumerIds()) {
if (id.equals(info.getConsumerId())) {
nc.removeNetworkConsumerId(id);
if (nc.isNetworkConsumersEmpty()) {
gcList.add(nc);
}
}
}
} else {
gcList.add(nc);
}
} else {
gcList.add(nc);
}
}
for (ConsumerInfo nc : gcList) {
networkConsumerList.remove(nc);
super.removeConsumer(context, nc);
LOG.warn("Removed stale network consumer" + nc);
for (ConsumerInfo nc : gcList) {
networkConsumerList.remove(nc);
super.removeConsumer(context, nc);
LOG.warn("Removed stale network consumer " + nc);
}
}
}
}