title: Can Kafka compaction overwrite messages with same partition key?
body: <p>I am using following code to write to Kafka:</p>
  
  <pre><code>String partitionKey = "" + System.currentTimeMillis();
  KeyedMessage&lt;String, String&gt; data = new KeyedMessage&lt;String, String&gt;(topic, partitionKey, payload);
  </code></pre>
  
  <p>And we are using 0.8.1.1 version of Kafka.</p>
  
  <p>Is it possible that when multiple threads are writing, some of them (with different payload) write with same partition key and because of that Kafka overwrites these messages (due to same partitionKey)?</p>
  
  <p>The documentation that got us thinking in this direction is: 
  <a href="http://kafka.apache.org/documentation.html#compaction" rel="nofollow">http://kafka.apache.org/documentation.html#compaction</a></p>