Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In short, the goal is to provide a stable, centrally controlled extension point for observability and operational automation, without forcing client SDK upgrades and without introducing high-cardinality metric tags. 

Public Interfaces

This KIP introduces:
 

Proposed Changes

 KIP introduces one new broker-side extension interface and one new broker configuration.

New Interface

org.apache.kafka.coordinator.group.api.ConsumerGroupRebalanceListener:

 // callback when a consumer group rebalance is detected by the Group Coordinator.

voidonConsumerGroupRebalance(String groupId, int groupEpoch, long metadataHash); 

New Broker Configuration

group.consumer.rebalance.listener.classes (LIST, default: empty)

  • A list of fully qualified class names implementing ConsumerGroupRebalanceListener.
  • Classes are instantiated and configured by the broker at startup.
  • Empty value means callback feature is disabled 

Proposed Changes

Add a lightweight broker-side callback path for consumer-group rebalance events, without changing client APIs and without adding high-cardinality metrics.

Server load the group.consumer.rebalance.listener.classes when startuping and trigger the callback interface when rebalance happened.

Refer to the PR example:You can refer to 

Compatibility, Deprecation, and Migration Plan 

...