title: ConnectException when one Kafka broker of cluster is down
body: <p>I have two Kafka brokers: server1:9092 and server2:9092
  I'm using a Java client to send a message to this cluster, this is the code:</p>
  
  <pre><code>@Test
  public void sendRecordToTopic() throws InterruptedException, ExecutionException {
  
      //See at http://kafka.apache.org/documentation.html#newproducerconfigs
      Properties props = new Properties();
      props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG,
              "server1:9092,server2:9092");
      props.put(ProducerConfig.ACKS_CONFIG, "1");
      props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.StringSerializer");
      props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.StringSerializer");
  
      KafkaProducer&lt;String, String&gt; producer = new KafkaProducer&lt;String, String&gt;(props);
  
      ProducerRecord&lt;String, String&gt; myRecord =
              new ProducerRecord&lt;String, String&gt;("my-replicated-topic", "test", "someValue");
  
      boolean syncSend = true;
  
      if (syncSend) {
          //Synchronously send
          producer.send(myRecord).get();
      } else {
          //Asynchronously send
          producer.send(myRecord);
      }
      producer.close();
  }
  </code></pre>
  
  <p>When one of the brokers is down the Test in some cases throws this exception (in this exception example 'server1' was down):</p>
  
  <blockquote>
    <p>2015-11-02 17:59:29,138 WARN 
    [org.apache.kafka.common.network.Selector] Error in I/O with
    server1/40.35.250.227 java.net.ConnectException: Connection refused:
    no further information    at
    sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)  at
    sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
      at org.apache.kafka.common.network.Selector.poll(Selector.java:238)
      at
    org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:192)
      at
    org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:191)
      at
    org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:122)
      at java.lang.Thread.run(Thread.java:745)</p>
  </blockquote>