IBM / sarama

Sarama is a Go library for Apache Kafka.
MIT License
11.57k stars 1.76k forks source link

Support for --delete-offsets for consumer group topic #1912

Closed alok87 closed 1 year ago

alok87 commented 3 years ago

Problem Description

Explaining the problem with an example:

ConsumerGroupA has topicA, and after few days we move the topicA to ConsumerGroupB due to some use case. Since the retention is infinite for this use cases the ConsumerGroupA for topicA stays active. The lag dashboards keep showing the lag for this dead topic group.

Since other topics are still using ConsumerGroupA we cannot delete the ConsumerGroupA. We just want to delete the topicA from ConsumerGroupA.

Problems:

Based on this stackoverflow answer, Kafka 2.4.0+ has support to delete individual consumer group id offsets from a topic which should solve this problem.

./kafka-consumer-groups.sh \
  --bootstrap-server kafka.{env}.elinvar.tech:9092 \
  --delete-offsets \
  --group {my-group} \
  --topic topicName0

KAFKA KIP for --delete-offset This has a great detail about this problem. https://cwiki.apache.org/confluence/display/KAFKA/KIP-496%3A+Administrative+API+to+delete+consumer+offsets

Support request

Is it possible to add support for --delete-offsets in Sarama?

github-actions[bot] commented 1 year ago

Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur. Please check if the main branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.

dnwe commented 1 year ago

Available in v1.30.0 and newer since https://github.com/IBM/sarama/pull/2006 merged