nerdexam
Confluent

CCDAK · Question #189

You have a Kafka consumer in production actively reading from a critical topic from which multiple other applications are consuming. You have a new requirement to update the offset of your consumer to

The correct answer is D. Update the consumer group's offset to the earliest position using the 'kafka-consumer-groups' CLI. To start reading from the beginning of the topic, use the kafka-consumer-groups CLI tool to reset the consumer group's offset to the earliest position. This approach is safe and does not affect other consumers or the topic's data.

Developing Kafka Consumers

Question

You have a Kafka consumer in production actively reading from a critical topic from which multiple other applications are consuming. You have a new requirement to update the offset of your consumer to start reading from the beginning of the topic Which action would you take?

Options

  • ATemporarily configure the topic's 'retention.ms' parameter to '0' to empty the topic.
  • BStart a new consumer application with the same consumer group id.
  • CUpdate the consumer configuration by setting the 'auto offset reset property to 'earliest'.
  • DUpdate the consumer group's offset to the earliest position using the 'kafka-consumer-groups' CLI

How the community answered

(15 responses)
  • A
    13% (2)
  • B
    7% (1)
  • C
    7% (1)
  • D
    73% (11)

Explanation

To start reading from the beginning of the topic, use the kafka-consumer-groups CLI tool to reset the consumer group's offset to the earliest position. This approach is safe and does not affect other consumers or the topic's data.

Topics

#consumer offset management#kafka-consumer-groups CLI#offset reset#production operations

Community Discussion

No community discussion yet for this question.

Full CCDAK Practice