public void write(ImageWriter writer, ImageWriterOptions options) {
        if (nextProducerId >= 0) {
            writer.write(0, new ProducerIdsRecord().
                    setBrokerId(-1).
                    setBrokerEpoch(-1).
                    setNextProducerId(nextProducerId));
        }
    }
The next producer ID, or -1 in the special case where no producer IDs have been issued.
metadata/src/main/java/org/apache/kafka/image/ProducerIdsImage.java