updateSlowConsumersList(subscribers);
@Override public void run() { if (maxTimeSinceLastAck < 0) { // nothing to do LOG.info("no limit set, slowConsumer strategy has nothing to do"); return; } if (getMaxSlowDuration() > 0) { // For subscriptions that are already slow we mark them again and check below if // they've exceeded their configured lifetime. for (SlowConsumerEntry entry : slowConsumers.values()) { entry.mark(); } } List<Destination> disposed = new ArrayList<Destination>(); for (Destination destination : destinations.values()) { if (destination.isDisposed()) { disposed.add(destination); continue; } // Not explicitly documented but this returns a stable copy. List<Subscription> subscribers = destination.getConsumers(); updateSlowConsumersList(subscribers); } // Clean up an disposed destinations to save space. for (Destination destination : disposed) { destinations.remove(destination.getName()); } abortAllQualifiedSlowConsumers(); }
@Override public void run() { if (maxTimeSinceLastAck < 0) { // nothing to do LOG.info("no limit set, slowConsumer strategy has nothing to do"); return; } if (getMaxSlowDuration() > 0) { // For subscriptions that are already slow we mark them again and check below if // they've exceeded their configured lifetime. for (SlowConsumerEntry entry : slowConsumers.values()) { entry.mark(); } } List<Destination> disposed = new ArrayList<Destination>(); for (Destination destination : destinations.values()) { if (destination.isDisposed()) { disposed.add(destination); continue; } // Not explicitly documented but this returns a stable copy. List<Subscription> subscribers = destination.getConsumers(); updateSlowConsumersList(subscribers); } // Clean up an disposed destinations to save space. for (Destination destination : disposed) { destinations.remove(destination.getName()); } abortAllQualifiedSlowConsumers(); }
@Override public void run() { if (maxTimeSinceLastAck < 0) { // nothing to do LOG.info("no limit set, slowConsumer strategy has nothing to do"); return; } if (getMaxSlowDuration() > 0) { // For subscriptions that are already slow we mark them again and check below if // they've exceeded their configured lifetime. for (SlowConsumerEntry entry : slowConsumers.values()) { entry.mark(); } } List<Destination> disposed = new ArrayList<Destination>(); for (Destination destination : destinations.values()) { if (destination.isDisposed()) { disposed.add(destination); continue; } // Not explicitly documented but this returns a stable copy. List<Subscription> subscribers = destination.getConsumers(); updateSlowConsumersList(subscribers); } // Clean up an disposed destinations to save space. for (Destination destination : disposed) { destinations.remove(destination.getName()); } abortAllQualifiedSlowConsumers(); }