In this article, we’ll explore a few strategies to purge data from an Apache Kafka topic.
Before we learn the strategies to clean-up the data, let’s acquaint ourselves with a simple scenario that demands a purging activity.
Messages in Apache Kafka automatically expire after a configured retention time. Nonetheless, in a few cases, we might want the message deletion to happen immediately.
Let’s imagine that a defect has been introduced in the application code that is producing messages in a Kafka topic. By the time a bug-fix is integrated, we already have many corrupt messages in the Kafka topic that are ready for consumption.
Such issues are most common in a development environment, and we want quick results. So, bulk deletion of messages is a rational thing to do.
#apache #apache-kafka