public static class Partitioners.RoundRobinPartitioner extends Object implements org.apache.kafka.clients.producer.Partitioner
Partitioner that implements 'round-robin' mechanism which evenly
distributes load between all available partitions.| Modifier and Type | Field and Description |
|---|---|
private int |
index |
| Constructor and Description |
|---|
RoundRobinPartitioner() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
configure(Map<String,?> configs) |
private int |
next(int numberOfPartitions) |
int |
partition(String topic,
Object key,
byte[] keyBytes,
Object value,
byte[] valueBytes,
org.apache.kafka.common.Cluster cluster) |
public void configure(Map<String,?> configs)
configure in interface org.apache.kafka.common.Configurablepublic int partition(String topic, Object key, byte[] keyBytes, Object value, byte[] valueBytes, org.apache.kafka.common.Cluster cluster)
partition in interface org.apache.kafka.clients.producer.Partitionerpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface org.apache.kafka.clients.producer.Partitionerprivate int next(int numberOfPartitions)
Copyright © 2022 Apache NiFi Project. All rights reserved.