Confluent
CCDAK · Question #104
A consumer is configured with enable.auto.commit=false. What happens when close() is called on the consumer object?
The correct answer is B. A rebalance in the consumer group will happen immediately. Calling close() on consumer immediately triggers a partition rebalance as the consumer will not be available anymore.
Developing Kafka Consumers
Question
A consumer is configured with enable.auto.commit=false. What happens when close() is called on the consumer object?
Options
- AThe uncommitted offsets are committed
- BA rebalance in the consumer group will happen immediately
- CThe group coordinator will discover that the consumer stopped sending heartbeats.
- DIt will cause rebalance after session.timeout.ms
How the community answered
(21 responses)- A10% (2)
- B76% (16)
- C5% (1)
- D10% (2)
Explanation
Calling close() on consumer immediately triggers a partition rebalance as the consumer will not be available anymore.
Topics
#enable.auto.commit#consumer close#rebalance trigger#consumer group
Community Discussion
No community discussion yet for this question.