title: How do I delete/clean Kafka queued messages without deleting Topic
body: <p>Is there any way to delete queue messages without deleting Kafka topics?<br>
  I want to delete queue messages when activating the consumer.</p>
  
  <p>I know there are several ways like: </p>
  
  <ol>
  <li><p>Resetting retention time  </p>
  
  <p><code>$ ./bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic MyTopic --config retention.ms=1000</code></p></li>
  <li><p>Deleting kafka files  </p>
  
  <p><code>$ rm -rf /data/kafka-logs/&lt;topic/Partition_name&gt;</code></p></li>
  </ol>