title: Kafka simple consumer intermittently missing messages
body: <p>I have a Kafka application from where I have been consuming messages using kafka-console-consumer.sh as following:</p>
  
  <pre><code>$./kafka-console-consumer.sh --zookeeper zookeeperhost:2181 --topic myTopic
  </code></pre>
  
  <p>which gives all the messages which I write to Kafka broker through a Kafka consumer without any miss.</p>
  
  <p>Recently I deployed the application in a different environment where zookeeperhost is not accessible (due to some reason). So I am using kafka-simple-consumer-shell.sh instead as below:</p>
  
  <pre><code>$./kafka-simple-consumer-shell.sh --broker-list brokerhost:9092 --topic myTopic --partition 0 --max-messages 1
  </code></pre>
  
  <p>But with this I see few messages (around 2-4 in 5000) go missed. Could someone please explain how kafka-simple-consumer-shell.sh reads messages.</p>
  
  <p>I am doubting that probably some messages are going to some different partition and as I am just reading from partition 0 so I am not getting all the messages every time. But I do not know how to check how many partitions are there? and what are the ids for other partitions? I tried with 1 but it does not work.</p>
  
  <p>Could someone please help.</p>