org.apache.storm.kafka.spout.subscription

## Class TopicAssigner

- java.lang.Object
- - org.apache.storm.kafka.spout.subscription.TopicAssigner

- All Implemented Interfaces:
    Serializable

      public class TopicAssigner
      extends Object
      implements Serializable

  Handles assigning partitions to the consumer and updating the rebalance listener.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TopicAssigner()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TopicAssigner

          public TopicAssigner()

  - ### Method Detail

    - #### assignPartitions

          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.

      Parameters:
        `K` - The consumer key type
        `V` - The consumer value type
        `consumer` - The Kafka consumer to assign partitions to
        `newAssignment` - The partitions to assign.
        `listener` - The rebalance listener to call back on when the assignment changes

Copyright © 2021 The Apache Software Foundation. All rights reserved.