Hi@Parth,
There are mainly two types of retention in kafka.
1. Time based retention
2. Size based retention
For time based retention you can set the below properties in kafka broker properties file
# Configures retention time in milliseconds
log.retention.ms=100
# Configures retention time in minutes
log.retention.minutes=10
# Used if log.retention.hours is not set
log.retention.hours=10
For size based retention you can set the below property in kafka broker properties file.
log.retention.bytes= 10000
Check your file once and set the above properties. If it is not working, share your kafka broker properties file.
Thank You