spreedly / kaffe

An opinionated Elixir wrapper around brod, the Erlang Kafka client, that supports encrypted connections to Heroku Kafka out of the box.
https://hex.pm/packages/kaffe
MIT License
149 stars 58 forks source link

Receives notification when rebalance in progress/assignments revoked #99

Open Leesanwei opened 4 years ago

Leesanwei commented 4 years ago

Hi, We are dealing with some scaling issues where if we have another consumer coming up in the same consumer group, we would like to delete some old cache. In order to do this, we would need to receive a notification when a rebalance is in progress and we'll also have to know what partitions each consumer gets. Would this be possible?

Thanks!

objectuser commented 4 years ago

That would definitely require some changes to Kaffe. 🤔 We'd be open to a PR on that. Not really even sure how to design it, but the notification might need to happen in either Kaffe.Subscriber or Kaffe.GroupMember.

harshagelivi commented 3 years ago

I am working on this for our use case. I made some changes and it seemed to work for us. Could someone please take a look at the PR - https://github.com/spreedly/kaffe/pull/108/files?

PS: This is the first time I'm working with Elixir and please don't mind if I made any obvious mistakes.