'kafka filtering messages vs tombstones

I'm reading into the filtering of messages in Kafka and I've seen some examples that look interesting to me but I have a questions, which is not a code error I'm getting but is just to confirm my understanding.

If I read the code correctly for example the filter of the message just makes the record null

https://github.com/apache/kafka/blob/trunk/connect/transforms/src/main/java/org/apache/kafka/connect/transforms/Filter.java#L39

Is the record null not the same as saying the content is a tombstone record? How will the further process be able to understand if this was a valid tombstone record or a simple message that was filtered (I can understand the message key will be different)

Mainly for systems that are interested in the tombstone I'm just wondering if filtering will not have un-desired consequences but maybe my understanding of the "null" being the same as tombstone is totally wrong.

I do understand (or I think I do) that there is a difference between record.value() == null or record == null but would this not cause a lot of null pointer exceptions in the rest of the transformation chain?

Thanks for any feedback.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source