Bird
0
0

You want to create a Confluent Cloud Kafka topic that automatically deletes messages after 7 days. Which configuration should you apply when creating the topic?

hard📝 Application Q15 of 15
Kafka - Kubernetes and Cloud Deployment
You want to create a Confluent Cloud Kafka topic that automatically deletes messages after 7 days. Which configuration should you apply when creating the topic?
ASet the topic's retention.ms to 604800000 (7 days in milliseconds).
BSet the topic's cleanup.policy to 'compact'.
CSet the topic's max.message.bytes to 7.
DSet the topic's partitions to 7.
Step-by-Step Solution
Solution:
  1. Step 1: Understand retention.ms setting

    retention.ms controls how long messages are kept before deletion, in milliseconds.
  2. Step 2: Calculate 7 days in milliseconds

    7 days x 24 hours x 60 minutes x 60 seconds x 1000 = 604800000 ms.
  3. Step 3: Match configuration to requirement

    Setting retention.ms to 604800000 ensures messages delete after 7 days; other options do not control retention time.
  4. Final Answer:

    Set the topic's retention.ms to 604800000 (7 days in milliseconds). -> Option A
  5. Quick Check:

    retention.ms = 7 days in ms [OK]
Quick Trick: Use retention.ms for message lifetime in ms [OK]
Common Mistakes:
  • Confusing cleanup.policy with retention time
  • Setting max.message.bytes instead of retention
  • Changing partitions unrelated to retention

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes