I wanted a certain kafka topic to only keep 1 day of data. But it didn't seem to delete any data at all if we keep sending data to the topic(active). I tried topic side parameter (retention.ms) and server side:
log.retention.hours=1 or log.retention.ms= 86400000
cleanup.policy=delete
But it didn't seem to work for alive topics, if we keep sending data to it. Only when we stop sending data to the topic, it will follow the retention policy.
So, what's the right config for a active topic, to retain data only for some time?