private int nextValue(String topic) {
        AtomicInteger counter = topicCounterMap.computeIfAbsent(topic, k -> new AtomicInteger(0));
        return counter.getAndIncrement();
    }
Compute the partition for the given record.

@param topic The topic name
@param key The key to partition on (or null if no key)
@param keyBytes serialized key to partition on (or null if no key)
@param value The value to partition on or null
@param valueBytes serialized value to partition on or null
@param cluster The current cluster metadata
clients/src/main/java/org/apache/kafka/clients/producer/RoundRobinPartitioner.java