Please can anyone tell me how to read messages using the Kafka Consumer API from the beginning every time when I run the consumer.
If you are using the java consumer api more specifically org.apache.kafka.clients.consumer.Consumer, You can try the seek* methods.
consumer.seekToBeginning(consumer.assignment())
Here, consumer.assignment() returns all the partitions assigned to a given consumer and seekToBeginning will start from the earliest offset for the given collection of partitions.