Skip to content

Configure retention time #4336

Answered by scholzj
ThePoipoi asked this question in Q&A
Jan 28, 2021 · 1 comments · 12 replies
Discussion options

You must be logged in to vote

Kafka topics have two policies: delete and cleanup. With the cleanup policy, it is keeping the last message for given message key. With the delete policy, it will delete them based on time. But it will always only delete the whole log segments once all messages in them are over the retention time. You can have some control over how often that happens for example by configuring how often new segments are created (using log.roll.ms) so that the old segments are closed and can be deleted even when they are not full. But to do this so often might have performance impact.

The configuration you have above should work in general. But:

  • Topics might still override these settings. They are basical…

Replies: 1 comment 12 replies

Comment options

You must be logged in to vote
12 replies
@scholzj
Comment options

@ThePoipoi
Comment options

@scholzj
Comment options

@scholzj
Comment options

@ThePoipoi
Comment options

Answer selected by ThePoipoi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants