Recall & Review
beginner
What is a time-based retention policy in Kafka?
A time-based retention policy in Kafka deletes messages older than a specified time limit, such as 7 days, to free up storage space.
Click to reveal answer
beginner
What does a size-based retention policy control in Kafka?
A size-based retention policy deletes the oldest messages when the total size of the log exceeds a set limit, like 1 GB, to manage disk usage.
Click to reveal answer
intermediate
How do time-based and size-based retention policies work together in Kafka?
Kafka applies both policies simultaneously: messages are deleted if they are older than the time limit or if the log size exceeds the size limit, whichever condition is met first.
Click to reveal answer
beginner
Which Kafka configuration controls the time-based retention?
The configuration 'retention.ms' sets the maximum time in milliseconds that Kafka retains a message before deleting it.
Click to reveal answer
beginner
Which Kafka configuration controls the size-based retention?
The configuration 'retention.bytes' sets the maximum size in bytes for the log before Kafka deletes older messages.
Click to reveal answer
What happens when a Kafka topic reaches its size-based retention limit?
✗ Incorrect
Kafka deletes the oldest messages to keep the log size within the configured limit.
Which configuration sets the time limit for message retention in Kafka?
✗ Incorrect
'retention.ms' controls how long messages are kept before deletion based on time.
If both time-based and size-based retention policies are set, when are messages deleted?
✗ Incorrect
Kafka deletes messages when either the time or size retention limit is exceeded.
What is the default behavior if no retention policy is set in Kafka?
✗ Incorrect
By default, Kafka retains messages for 7 days (retention.ms = 604800000 ms).
Which retention policy helps control disk space usage in Kafka?
✗ Incorrect
Size-based retention deletes old messages when log size exceeds a limit, controlling disk usage.
Explain how Kafka uses time-based and size-based retention policies to manage message storage.
Think about how Kafka decides when to remove old messages.
You got /3 concepts.
Describe the Kafka configurations that control retention policies and their effects.
Focus on the key configuration names and what they do.
You got /3 concepts.