nerdexam
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)
  • A
    10% (2)
  • B
    76% (16)
  • C
    5% (1)
  • D
    10% (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.

Full CCDAK Practice