接口 ConsumerEventListener

所有超级接口:
Serializable

@Public @Stable public interface ConsumerEventListener extends Serializable
Listener on the consumer state changes.
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    becameActive(Consumer<?> consumer, int partitionId)
    Notified when the consumer group is changed, and the consumer becomes the active consumer.
    void
    becameInactive(Consumer<?> consumer, int partitionId)
    Notified when the consumer group is changed, and the consumer is still inactive or becomes inactive.
  • 方法详细资料

    • becameActive

      void becameActive(Consumer<?> consumer, int partitionId)
      Notified when the consumer group is changed, and the consumer becomes the active consumer.
      参数:
      consumer - the consumer that originated the event
      partitionId - the id of the partition that became active
    • becameInactive

      void becameInactive(Consumer<?> consumer, int partitionId)
      Notified when the consumer group is changed, and the consumer is still inactive or becomes inactive.
      参数:
      consumer - the consumer that originated the event
      partitionId - the id of the partition that became inactive