bsm / sarama-cluster

Cluster extensions for Sarama, the Go client library for Apache Kafka 0.9 [DEPRECATED]
MIT License
1.01k stars 222 forks source link

How to get Notification() - rebalance notification in sarama lib #297

Closed lingzhang000 closed 5 years ago

lingzhang000 commented 5 years ago

Hello, Since sarama-cluster already been deprecated and it is suggested to use sarama lib instead, is there any possibility to get Notification() in sarama lib? seems it has been deleted (any reason for that)... the reason for asking is we would like to do some customized logic when rebalance is triggered... thanks so much in advance...

dim commented 5 years ago

@lingzhang000 there is no need for it as you consume through a for loop in sarama's ConsumerGroup. You can also define Setup/Cleanup callbacks on the Handler