聊聊artemis的DelayedAddRedistributor
序 本文主要研究一下artemis的DelayedAddRedistributor addRedistributor activemq-artemis-2.11.0/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java public class QueueImpl extends CriticalComponentImpl implements Queue { //...... public synchronized void addRedistributor(final long delay) { clearRedistributorFuture(); if (redistributor != null) { // Just prompt delivery deliverAsync(); } if (delay > 0) { if (consumers.isEmpty()) { DelayedAddRedistributor dar = new DelayedAddRedistributor(executor); redistributorFuture = scheduledExecutor.schedule(dar, delay, TimeUnit