int randomPartition() {
        return Utils.toPositive(ThreadLocalRandom.current().nextInt());
    }
Calculate the next partition for the topic based on the partition load stats.
clients/src/main/java/org/apache/kafka/clients/producer/internals/BuiltInPartitioner.java