@SuppressWarnings("deprecation")
    public void onNewBatch(String topic, Cluster cluster, int prevPartition) {
        stickyPartitionCache.nextPartition(topic, cluster, prevPartition);
    }
If a batch completed for the current sticky partition, change the sticky partition. 
Alternately, if no sticky partition has been determined, set one.
clients/src/main/java/org/apache/kafka/clients/producer/UniformStickyPartitioner.java