We have an application which uses Lmax Disruptor. We originally configured the Disruptor by
this.disruptor = new Disruptor<>(
GenericEvent::new,
BUFFER_SIZE,
createThreadFactory("consumer-thread"),
ProducerType.SINGLE,
new BlockingWaitStrategy());
this.ringBuffer = disruptor.getRingBuffer();
ConsumerPool consumers = eventHandlerFactory.createPool(POOL_SIZE);
this.disruptor.handleEventsWithWorkerPool(consumers);
But from what I understand, the pool sent to handleEventsWithWorkerPool does not distribute the work to all the consumers in the pool. We saw (through JFR), that only the last thread was doing all the work.
My question is, what sort of metric could I have used to see that only one thread was doing all the work? Something that doesn't require running JFR after the application has gotten too slow?
I know if my threads are in a ThreadPool Executor, I can get lots of metrics on usage, etc.
Thanks
Assuming
createThreadFactory("consumer-thread")is a custom method which creates threads.You should be able to give uniquename to each thread and task could log threadname when loglevel=DEBUG