Move messages cache stale discard to a separate scheduler

This commit is contained in:
Chris Eager
2022-11-11 15:35:12 -06:00
committed by Chris Eager
parent 99ad211c01
commit df8fb5cab7
3 changed files with 7 additions and 3 deletions

View File

@@ -329,7 +329,7 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
config.getAppConfig().getConfigurationName(),
DynamicConfiguration.class);
BlockingQueue<Runnable> messageDeletionQueue = new ArrayBlockingQueue<>(10_000);
BlockingQueue<Runnable> messageDeletionQueue = new LinkedBlockingQueue<>();
Metrics.gaugeCollectionSize(name(getClass(), "messageDeletionQueueSize"), Collections.emptyList(),
messageDeletionQueue);
ExecutorService messageDeletionAsyncExecutor = environment.lifecycle()