I need to create a Kafka setup where at the start of each day, all messages in a topic must get deleted and its offset reset to 0.
I have tried to do this by setting log.retention to 1 day but it didn't seem to work. I also ran kafka-delete-records
. It did delete all the messages but kafka.tools.GetOffsetShell
still gave me the latest offset. I want it to go to 0.
Also, I am not explicitly setting a consumer group. They are internal ones like _confluent-ksql-default_transient_929377247691956102_1560973030312
. So I want the offset for the topic to be reset to 0 irrespective of the consumer group.