We have a topic with 5 partitions. We are defining the partition based on the checksum of the key. There are cases where there are no key resolving to partition 3 and so there are no commits made. Hence after the configured number of days for offset retention, the consumer current offset starts showing unknown. We will need to resolve this, hence thought we will have to set log and offset retention at topic level. In the config, I see that we have config:retention.ms is for log retention but did not find corresponding offset retention configuration. Can someone please help on the same.
Edit: bin/kafka-topics.sh --zookeeper XXX --alter --topic XXXX --config retention.ms=86400000
The above is used to set the log retention time specific to the topic. But how can we specify the offset retention in the query.