Class StickyPartitionCache

java.lang.Object
org.apache.kafka.clients.producer.internals.StickyPartitionCache

public class StickyPartitionCache extends Object
An internal class that implements a cache used for sticky partitioning behavior. The cache tracks the current sticky partition for any given topic. This class should not be used externally.
  • Constructor Details

    • StickyPartitionCache

      public StickyPartitionCache()
  • Method Details

    • partition

      public int partition(String topic, org.apache.kafka.common.Cluster cluster)
    • nextPartition

      public int nextPartition(String topic, org.apache.kafka.common.Cluster cluster, int prevPartition)