Bird
0
0

Given the command:

medium📝 Predict Output Q13 of 15
Kafka - Topics and Partitions
Given the command:
kafka-topics.sh --alter --topic logs --config retention.ms=60000 --bootstrap-server localhost:9092
What will be the effect on the topic logs?
AMessages will be retained indefinitely
BThe topic's replication factor will be set to 60000
CThe topic will be deleted after 60000 messages
DMessages will be retained for 1 minute before deletion
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command's purpose

    The command alters the topic logs by setting retention.ms to 60000 milliseconds (1 minute).
  2. Step 2: Interpret retention.ms effect

    This means messages older than 1 minute will be deleted automatically.
  3. Final Answer:

    Messages will be retained for 1 minute before deletion -> Option D
  4. Quick Check:

    retention.ms=60000 means 1 minute retention [OK]
Quick Trick: retention.ms value is in milliseconds for message lifetime [OK]
Common Mistakes:
  • Thinking retention.ms controls message count
  • Confusing retention.ms with replication factor
  • Assuming retention.ms disables deletion

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes