title: When does kafka change leader?
body: <p>I was running my services that work with kafka already for a year and no spontaneous changes of leader happens. 
  But for the last 2 weeks that started happens quite often. 
  Kafka log on that:</p>
  
  <ul>
  <li>[2015-09-27 15:35:14,826] INFO [ReplicaFetcherManager on broker 2]
  Removed fetcher for partitions [myTopic] (kafka.server.ReplicaFetcherManager) </li>
  <li>[2015-09-27 15:35:14,830] INFO Truncating log myTopic-0 to offset 11520979. (kafka.log.Log) </li>
  <li>[2015-09-27 15:35:14,845] WARN [Replica Manager on Broker 2]: Fetch request with correlation id 713276 from client ReplicaFetcherThread-0-2 on partition [myTopic,0] failed due to Leader not local for partition [myTopic,0] on broker 2 (kafka.server.ReplicaManager) </li>
  <li>[2015-09-27 15:35:14,857] WARN [Replica Manager on Broker 2]: Fetch request with correlation id 256685 from client mirrormaker-1 on partition [myTopic,0] failed due to Leader not local for partition [myTopic,0] on broker 2 (kafka.server.ReplicaManager) </li>
  <li>[2015-09-27 15:35:20,171] INFO [ReplicaFetcherManager on broker 2] Removed fetcher for partitions [myTopic,0] (kafka.server.ReplicaFetcherManager)</li>
  </ul>
  
  <p>What can cause switching leader? If there is info in some kafka documentation - please - just point the link. I've failed to find.</p>
  
  <hr>
  
  <p>System configuration</p>
  
  <p>kafka version: kafka_2.10-0.8.2.1</p>
  
  <p>os:  Red Hat Enterprise Linux Server release 6.5 (Santiago)</p>
  
  <p>server.properties (differs from default): </p>
  
  <ul>
  <li>broker.id=001</li>
  <li>socket.send.buffer.bytes=1048576</li>
  <li>socket.receive.buffer.bytes=1048576</li>
  <li>socket.request.max.bytes=104857600 </li>
  <li>log.flush.interval.messages=10000</li>
  <li>log.flush.interval.ms=1000 </li>
  <li>log.retention.bytes=-1</li>
  <li>controlled.shutdown.enable=true </li>
  <li>auto.create.topics.enable=false</li>
  </ul>