silviucpp / erlkaf

Erlang kafka driver based on librdkafka
MIT License
83 stars 41 forks source link

Support pause/resume of consumer #34

Open JackMF opened 2 years ago

JackMF commented 2 years ago

Is it possible to support this feature here? Is there a road map for other features?

https://kafka.apache.org/0102/javadoc/org/apache/kafka/clients/consumer/KafkaConsumer.html#:~:text=Kafka%20supports%20dynamic%20controlling%20of,future%20poll(long)%20calls.

silviucpp commented 2 years ago

Hello,

There is no roadmap for any new feature. Any PR is welcome. I usually implemented the features I'm using in our applications.

Silviu

JackMF commented 2 years ago

Hey see this WIP MR to support pause and resuming of consumers: https://github.com/silviucpp/erlkaf/pull/35

This idea here is to turn the cosnumer into a genstate_m and have a "paused" state and a "polling" state.

Let me know what you think about this approach @silviucpp and I will continue to with the requried changes to -erlkaf_consumer_group and erlkaf_manager so that pasue and resume can be called by the api.