title: Check message has been written to kafka topic using command line
body: <p><strong>Firstly, please note that using the java consumer API is not an option. Why it is not an option I am unable to disclose, but I must be able to do the following using a shell command.</strong></p>
  
  <p>I have a topic that I have written a message to, and I can confirm this is the case if I run <code>./kafka-console-consumer.sh</code> with the <code>--from-beginning</code> option, but since this starts a consumer then the command gets stuck and requires manual intervention with a SIGINT. I have come close using <code>--timeout-ms</code>, however this is not ideal as unless I select a high value there is the possibility that the dump of the data is unreliable.<br>
  I would like to dump the output of console-consumer in such a manner that it can be grepped, <strong><em>or</em></strong> a suitable alternative method. </p>