kafka-python icon indicating copy to clipboard operation
kafka-python copied to clipboard

Null payload for Kafka log compaction deletion feature

Open vshlapakov opened this issue 11 years ago • 2 comments

According to the official doc Kafka log compaction could be used to delete messages from the log: Compaction also allows from deletes. A message with a key and a null payload will be treated as a delete from the log. This delete marker will cause any prior message with that key to be removed (as would any new message with that key), but delete markers are special in they will themselves be cleaned out of the log after a period of time.

But now there's a limitation in the code that doesn't allow to pass null payloads, so the deletion feature doesn't work at all. Was it done by purpose for some reasons or I can prepare a short PR to fix it?

vshlapakov avatar Jun 16 '15 06:06 vshlapakov

Tested; Kafka deletion feature works with this patch, take a look please!

vshlapakov avatar Jun 16 '15 09:06 vshlapakov

PR welcome. Can you also take a look at https://github.com/mumrah/kafka-python/issues/124 while you're addressing None values?

dpkp avatar Jun 16 '15 16:06 dpkp