title: Kafka 0.9.0.1 Java Consumer stuck in awaitMetadataUpdate()
body: <p>I'm trying to get a simple Kafka Consumer to work using the Java API v0.9.0.1. The kafka server I'm using is a docker container, also running version 0.9.0.1.  Below is the consumer code:</p>
  
  <pre><code>public class Consumer {
      public static void main(String[] args) throws IOException {
  
          KafkaConsumer&lt;String, String&gt; consumer;
          try (InputStream props = Resources.getResource("consumer.props").openStream()) {
              Properties properties = new Properties();
              properties.load(props);
              consumer = new KafkaConsumer&lt;&gt;(properties);
          }
  
          consumer.subscribe(Arrays.asList("messages"));
          try {
              while (true) {
                  ConsumerRecords&lt;String, String&gt; records = consumer.poll(100);
                  for (ConsumerRecord&lt;String, String&gt; record : records)
                      System.out.println("Message received: " + record.value());
              }
          }catch(WakeupException ex){
              System.out.println("Exception caught " + ex.getMessage());
          }finally{
              consumer.close();
              System.out.println("After closing KafkaConsumer");
          }
      }
  }
  </code></pre>
  
  <p>However, when starting the consumer, it calls the poll(100) method above and never returns. Debugging, it looks like it gets stuck running the following method in org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient forever:</p>
  
  <pre><code>public void awaitMetadataUpdate() {
      int version = this.metadata.requestUpdate();
  
      do {
          this.poll(9223372036854775807L);
      } while(this.metadata.version() == version);
  
  }
  </code></pre>
  
  <p>(both version and this.metadata.version() always seem to be == 2). Additionally, though it throws no errors, messages from my java producer never seen to make it to the queue. I've verified that using the command line kafka tools, I can both send and receive messages from the queue. </p>
  
  <p>Anyone have any clue what's going on here?</p>