Class NumberPartitioner

  • All Implemented Interfaces:
    Closeable, AutoCloseable, org.apache.kafka.clients.producer.Partitioner, org.apache.kafka.common.Configurable

    public class NumberPartitioner
    extends Object
    implements org.apache.kafka.clients.producer.Partitioner
    • Constructor Detail

      • NumberPartitioner

        public NumberPartitioner()
    • Method Detail

      • configure

        public void configure​(Map<String,​?> configs)
        Specified by:
        configure in interface org.apache.kafka.common.Configurable
      • partition

        public int partition​(String topic,
                             Object key,
                             byte[] keyBytes,
                             Object value,
                             byte[] valueBytes,
                             org.apache.kafka.common.Cluster cluster)
        Specified by:
        partition in interface org.apache.kafka.clients.producer.Partitioner
      • close

        public void close()
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface org.apache.kafka.clients.producer.Partitioner