I think it's related to the below links, but I don't understand.
It's possible to provide topic configurations like "retention.ms", "cleanup.policy" for kafka streams internal topics like *-changelog topics to delete useless logs.
But when it comes to internal topics like *-repartition topics, it's not possible to provide topic configuration values, even though the default "retention.ms" for repartition topic is "-1" which means infinite retention. How can I delete or manage repartition topics? Otherwise the repartition topic's size is going to be too large and disk malfunction problems might occur.
How can I manage repartition topics? What is purgeData? Couldn't find any related explanations on the documentation.
Fact
retention.ms
for the repartition topics is -1 by default and there's no way to override this value in kafka-streams client code.What I misunderstood
retentions.ms
for the repartition topics is -1.Fix misunderstanding
maybeCommit
in the StreamThread
class.maybeCommit
method is called iteratively inside the loop that handles stream records.maybeCommit
method (version 2.7.1), there's a comment like below.
try to purge the committed records for repartition topics if possible
retention.ms
for the repartition topics.Reference
Please leave a comment or correct this if I'm wrong.