But the consumer is not reading any message from kafka. If I add the belowat the very start()

consumer.poll(0);

consumer.seekToBeginning(consumer.assignment());Then the consumer starts reading from the topic. But then each time theconsumer is restarted it is reading message from the start of the topicwhich I don;t want. Can someone let me know what is going wrong and how canI fix this?Kafka Version 0.10

Apache Lucene, Apache Solr and all other Apache Software Foundation project and their respective logos are trademarks of the Apache Software Foundation.
Elasticsearch, Kibana, Logstash, and Beats are trademarks of Elasticsearch BV, registered in the U.S. and in other countries. This site and Sematext Group is in no way affiliated with Elasticsearch BV.
Service operated by Sematext