public void removeExpiredProducers(long currentTimeMs) {
        producers.entrySet().removeIf(entry -> isProducerExpired(currentTimeMs, entry.getValue()));
        producerIdCount = producers.size();

        verificationStates.entrySet().removeIf(entry ->
            (currentTimeMs - entry.getValue().timestamp()) >= producerStateManagerConfig.producerIdExpirationMs()
        );
    }
Expire any producer ids which have been idle longer than the configured maximum expiration timeout.
Also expire any verification state entries that are lingering as unverified.
storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateManager.java