private boolean isProducerExpired(long currentTimeMs, ProducerStateEntry producerState) {
        return !producerState.currentTxnFirstOffset().isPresent() && currentTimeMs - producerState.lastTimestamp() >= producerStateManagerConfig.producerIdExpirationMs();
    }
Get an unmodifiable map of active producers.
storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateManager.java