Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How and why and what for do tombstone records appear in Kafka?

Tags:

apache-kafka

Studying kafka, came across issues deletes tombstone messages ( e.g. while log compaction)

But my question is: how do tombstones even appear there? Who and why wanna use it and for what?

like image 990
J.J. Beam Avatar asked Oct 17 '25 12:10

J.J. Beam


1 Answers

They are written by the producing application (e.g. Producer API, or Kafka Connect source connector) by putting a null in the value part of the message. It denotes a logical deletion for the associated key in the message. If you use log compaction then in time the previous values for that key are actually deleted too.

More info: https://medium.com/@damienthomlutz/deleting-records-in-kafka-aka-tombstones-651114655a16

like image 67
Robin Moffatt Avatar answered Oct 20 '25 07:10

Robin Moffatt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!