3 ms·
> delete crap from topics You have to rewrite the whole topic to do this right? (or do some hacks with compaction if you have unique keys)
by rockwotj 2y ago
> delete crap from topics
You have to rewrite the whole topic to do this right? (or do some hacks with compaction if you have unique keys)
- bink 2y agoOr just advance the offsets for that partition beyond the problematic data, or adjust retention, or both.
- nick0garvey 2y agoThere is also the deleteRecords API specifically for this. It's easier than the retention shrink -> increase dance, as it is a single API call and retention does not kick in immediately. The log segment must roll for retention to apply, either due to size or time. https://kafka.apache.org/11/javadoc/org/apache/kafka/clients/admin/AdminClient.html#deleteRecords-java.util.Map- https://kafka.apache.org/11/javadoc/org/apache/kafka/clients...