I am going through the kafka pause & resume feature present in Consumer.
I am wondering if this pause occurs for all the consumers present in a consumer group ? I have also read here that the pause state is persisted on Kafka Server for the consumer group.
If someone can answer the above questions/ point me to the right resources , it would be helpful.
Pause is just the Consumer's own normal action, not the removal from consumer group. as the API docs said, Pause() will suspend fetching from the partition, this method does not affect partition subscription. So it won't be removed from consumer group, and won't cause the group rebalance.
if this pause occurs for all the consumers present in a consumer group, that will cause the lagEndOffset of this group for every partition of this topic will only increase in this period. Because the message model of Kafka is a PULL model, So when to fetch how to fetch is depending on the consumer. And every consumer in a same group does not influence each other when pause or resume. Because it won't cause a rebalance.
You could read this http://kafka.apache.org/documentation.html#theconsumer && http://kafka.apache.org/documentation.html#impl_consumerregistration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With