public class TopicAssigner extends Object implements Serializable
Handles assigning partitions to the consumer and updating the rebalance listener.
| Constructor and Description | 
|---|
TopicAssigner()  | 
| Modifier and Type | Method and Description | 
|---|---|
<K,V> void | 
assignPartitions(org.apache.kafka.clients.consumer.Consumer<K,V> consumer,
                Set<org.apache.kafka.common.TopicPartition> newAssignment,
                org.apache.kafka.clients.consumer.ConsumerRebalanceListener listener)
Assign partitions to the KafkaConsumer. 
 | 
public <K,V> void assignPartitions(org.apache.kafka.clients.consumer.Consumer<K,V> consumer,
                                   Set<org.apache.kafka.common.TopicPartition> newAssignment,
                                   org.apache.kafka.clients.consumer.ConsumerRebalanceListener listener)
Assign partitions to the KafkaConsumer.
K - The consumer key typeV - The consumer value typeconsumer - The Kafka consumer to assign partitions tonewAssignment - The partitions to assign.listener - The rebalance listener to call back on when the assignment changesCopyright © 2022 The Apache Software Foundation. All rights reserved.