hi Aditya chia_00: What happens if a user calls setRebalanceListener(listener) multiple times? I assume the previous listener will be replaced. If so, could you please explicitly state this behavior in the Javadoc?
Best, Chia-Ping On 2026/04/01 15:16:36 Aditya Kousik wrote: > Hi all, > > I'd like to start a discussion on KIP-1306: RebalanceHandler: Consumer-Aware > Rebalance Callback. > > https://cwiki.apache.org/confluence/display/KAFKA/KIP-1306%3A+RebalanceHandler%3A+Consumer-Aware+Rebalance+Callback > > Spring Kafka, SmallRye, and Micronaut all pass the consumer into rebalance > callbacks; the client doesn't. The standard workaround of > constructor-injecting a full Consumer reference allows dangerous operations > like poll() and close() inside a callback. This KIP proposes > RebalanceHandler, with a RebalanceConsumerView that exposes only safe > operations, making misuse a compile error. > > Looking forward to your feedback. > > Thanks >
