title: Need to understand kafka broker property "log.flush.interval.messages"
body: <p>I want to understand <code>log.flush.interval.messages</code> setting in kafka broker.</p>
  
  <blockquote>
    <p>The number of messages written to a log partition before we force an
    fsync on the log</p>
  </blockquote>
  
  <p>Does it mean when it reaches the specified number of messages then it will write to another file in the disk? If so then:</p>
  
  <ol>
  <li>When consumer wants to read then it has to get it from disk which is
  time consuming. Is this correct?</li>
  <li><p>At the same time </p>
  
  <blockquote>
    <p>A message is only exposed to the consumers after it is flushed to Disk from segment file(<a href="http://notes.stephenholiday.com/Kafka.pdf" rel="noreferrer">http://notes.stephenholiday.com/Kafka.pdf</a>)</p>
  </blockquote>
  
  <p>Then consumer always reads from disk as it cant read from segment file?</p></li>
  <li><p>What is the difference between storing in a segment file and on a disk?</p></li>
  </ol>