title: Why isn't kafka continuing to work on fail of one of the brokers?
body: <p>I am under the impression that with two brokers with sync turned on my kafka setup should keep on working even on fail of one of the broker.</p>
  
  <p>To test it I made a new topic named topicname. Its description is as follows:</p>
  
  <pre><code>Topic:topicname    PartitionCount:1 ReplicationFactor:1 Configs:
  Topic: topicname    Partition: 0    Leader: 0   Replicas: 0 Isr: 0
  </code></pre>
  
  <p>Then I ran producer.sh and consumer.sh in the following way: </p>
  
  <pre><code>bin/kafka-console-producer.sh --broker-list localhost:9092,localhost:9095 sync --topic topicname
  
  bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic topicname --from-beginning
  </code></pre>
  
  <p>Till both the brokers were working I saw that messages were being received properly by the consumer, but when I killed one of the instance of the brokers through <code>kill</code> command then the consumer stopped showing me any new messages. Instead it showed me the following error message:</p>
  
  <pre><code>WARN [ConsumerFetcherThread-console-consumer-57116_ip-&lt;internalipvalue&gt;-1438604886831-603de65b-0-0], Error in fetch Name: FetchRequest; Version: 0; CorrelationId: 865; ClientId: console-consumer-57116; ReplicaId: -1; MaxWait: 100 ms; MinBytes: 1 bytes; RequestInfo: [topicname,0] -&gt; PartitionFetchInfo(9,1048576). Possible cause: java.nio.channels.ClosedChannelException (kafka.consumer.ConsumerFetcherThread)
  [2015-08-03 12:29:36,341] WARN Fetching topic metadata with correlation id 1 for topics [Set(topicname)] from broker [id:0,host:&lt;hostname&gt;,port:9092] failed (kafka.client.ClientUtils$)
  java.nio.channels.ClosedChannelException
  at kafka.network.BlockingChannel.send(BlockingChannel.scala:100)
  at kafka.producer.SyncProducer.liftedTree1$1(SyncProducer.scala:73)
  at kafka.producer.SyncProducer.kafka$producer$SyncProducer$$doSend(SyncProducer.scala:72)
  at kafka.producer.SyncProducer.send(SyncProducer.scala:113)
  at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:58)
  at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:93)
  at kafka.consumer.ConsumerFetcherManager$LeaderFinderThread.doWork(ConsumerFetcherManager.scala:66)
  at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:60)
  </code></pre>