title: How do I ensure that logs are retained forever in Kafka?
body: <p>I need to configure Kafka <em>never</em> to delete logs.  Looking at their documentation, I see two kinds of parameters that control this:</p>
  
  <ul>
  <li><p>The "log cleaner", described at <a href="http://kafka.apache.org/documentation.html#compaction" rel="noreferrer">http://kafka.apache.org/documentation.html#compaction</a>.  It seems that setting <code>log.cleaner.enable = false</code> prevents the cleaner from deleting or compacting logs.</p></li>
  <li><p>The "log retention" mechanism, described at <a href="http://kafka.apache.org/documentation.html#configuration" rel="noreferrer">http://kafka.apache.org/documentation.html#configuration</a> under <code>log.retention.&lt;time scales&gt;</code>.  It seems that setting <code>log.retention.ms = -1</code> signals infinite retention.</p></li>
  </ul>
  
  <p>My question is:</p>
  
  <blockquote>
    <p>What is the relationship between these two mechanisms, are these the only two, and are the above settings necessary and sufficient to prevent logs from ever being deleted?</p>
  </blockquote>