nerdexam
Confluent

CCDAK · Question #157

You are designing a stream pipeline to monitor the real-time location of GPS trackers, where historical location data is not required. Each event in the stream has the following structure: - Key…

The correct answer is C. cleanup.policy = compact. Setting cleanup.policy = compact enables log compaction, ensuring that only the latest value for each key (tracker_id) is retained in the topic, which is ideal for storing the most recent GPS location per tracker.

Application Design

Question

You are designing a stream pipeline to monitor the real-time location of GPS trackers, where historical location data is not required. Each event in the stream has the following structure:

  • Key: tracker_id
  • Value: latitude, longitude

You need to ensure that the latest location for each tracker is always retained in the Kafka topic. Which topic configuration parameter should you set?

Options

  • Aretention.ms = 0
  • Bmin.cleanable.dirty.ratio = -1
  • Ccleanup.policy = compact
  • Dretention.ms = infinite

How the community answered

(57 responses)
  • A
    14% (8)
  • B
    7% (4)
  • C
    75% (43)
  • D
    4% (2)

Explanation

Setting cleanup.policy = compact enables log compaction, ensuring that only the latest value for each key (tracker_id) is retained in the topic, which is ideal for storing the most recent GPS location per tracker.

Topics

#log compaction#cleanup.policy#compact#stateful topics

Community Discussion

No community discussion yet for this question.

Full CCDAK Practice