private void drainEvents() {
            CoordinatorEvent event;
            while ((event = accumulator.poll()) != null) {
                try {
                    log.debug("Draining event: {}.", event);
                    metrics.recordEventQueueTime(time.milliseconds() - event.createdTimeMs());
                    event.complete(new RejectedExecutionException("EventProcessor is closed."));
                } catch (Throwable t) {
                    log.error("Failed to reject event {} due to: {}.", event, t.getMessage(), t);
                } finally {
                    accumulator.done(event);
                }
            }
        }
The event processor thread. The thread pulls events from the
accumulator and runs them.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/runtime/MultiThreadedEventProcessor.java