title: Terminate Kafka Console Consumer when all the messages have been read
body: <p>I know there has to be a way to do this, but I am not able to figure this out. I need to stop the kafka consumer once I have read all the messages from the queue.</p>
  
  <p>Can somebody provide any info on this?</p>