title: What does it really mean by "Kafka partitions are immutable"?
body: <p>In all the Kafka tutorials I've read so far they all mentioned "Kafka partitions are immutable". However, I also read from this site <a href="https://towardsdatascience.com/log-compacted-topics-in-apache-kafka-b1aa1e4665a7" rel="nofollow noreferrer">https://towardsdatascience.com/log-compacted-topics-in-apache-kafka-b1aa1e4665a7</a> that from time to time, Kafka will remove older messages in the partition (depending on the retention time you set in the log-compact command). You can see from the screenshot below that data within the partition has clearly changed after removing the duplicate Keys in the partition:</p>
  
  <p><a href="https://i.stack.imgur.com/JziO8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JziO8.png" alt="enter image description here"></a></p>
  
  <p>So my question is what exactly does it mean to say "Kafka partitions are immutable"? </p>