private void setProducerIdAndEpoch(ProducerIdAndEpoch producerIdAndEpoch) {
        log.info("ProducerId set to {} with epoch {}", producerIdAndEpoch.producerId, producerIdAndEpoch.epoch);
        this.producerIdAndEpoch = producerIdAndEpoch;
    }
Set the producer id and epoch atomically.
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java