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 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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue