title: Kafka topic record retention policies not clear
body: <p>From Kafka Docs I got interested and tried the following 2 retention types <strong>together</strong></p>
  <h2>log.retention.bytes:</h2>
  <blockquote>
  <p>The maximum size of the log before deleting it
  Type: longDefault: -1Valid Values:Importance: highUpdate Mode: cluster-wide</p>
  </blockquote>
  <h2>log.retention.ms</h2>
  <blockquote>
  <p>The number of milliseconds to keep a log file before deleting it (in
  milliseconds), If not set, the value in log.retention.minutes is used.
  If set to -1, no time limit is applied. Type: longDefault: nullValid
  Values:Importance: highUpdate Mode: cluster-wide</p>
  </blockquote>
  <p>AS</p>
  <ol>
  <li>log.retention.bytes = 1Gb</li>
  <li>log.retention.ms    = 7 days</li>
  </ol>
  <hr />
  <h3>Problem Situation</h3>
  <p>I have currently on my topic all messages belonging two different log files both of which are &lt; 1GB</p>
  <p>Lets say log.1 files has 400 MB of messages with oldest message &gt; 7 days old.</p>
  <p><strong>which is on the top of</strong></p>
  <p>log.2 file has 500 MB with newest message &gt; 7 days old.</p>
  <p>I understand kafka would clean up all records belonging to log.2 file in other words remove this log from the topic.</p>
  <p>What happens to the records in the log.1 which are older than 7 days?</p>