Open mwalser opened 1 month ago
Hey @mwalser
The check was introduced to prevent resetting offsets when the group is in Stable
state: https://github.com/deviceinsight/kafkactl/commit/c5991de0cf033dcd9ee8a4be614e1ac0feea8632 / https://github.com/deviceinsight/kafkactl/issues/43
I guess it is safe to do it in Dead
state also.
I would be happy to review your PR for this :slightly_smiling_face:
We recently had to adjust the offsets of a partition in Azure EventHub. However, it didn't work:
When resetting the offsets while a consumer was active, kafkactl refused to do so. This is expected:
However, after stopping the consumer, resetting the offset was still not possible;:
Looking at the code, setting offsets is only allowed when the consumer group is in state
Empty
. However, it seems like the Azure EventHub Kafka interface skips theEmpty
state and goes directly toDead
once no consumer is present on the group. At least that's the observation. I wasn't able to find documentation from Microsoft regarding this behavior.Using a locally built kafkactl version with the check patched out, resetting the offsets worked even with the consumer group being in the
Dead
state. Looking at the Kafka command line tool, it also allows resetting the offsets when a group is in theDead
state.If wanted, I can try to create a PR.