# New blog: 🎄 Twelve Days of SMT 🎄 - Day 11: Predicate and Filter

**URL:** <https://forum.confluent.io/t/new-blog-twelve-days-of-smt-day-11-predicate-and-filter/389>\
**Category:** Kafka Connect\
**Created:** [22 December 2020 16:52 UTC](https://forum.confluent.io/t/new-blog-twelve-days-of-smt-day-11-predicate-and-filter/389 "2020-12-22T16:52:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [22 December 2020 16:52 UTC](https://forum.confluent.io/t/new-blog-twelve-days-of-smt-day-11-predicate-and-filter/389/1 "2020-12-22T16:52:09Z")

</div>

Apache Kafka 2.6 included KIP-585 which adds support for defining predicates against which transforms are conditionally executed, as well as a Filter Single Message Transform to drop messages - which in combination means that you can conditionally drop messages.

As part of Apache Kafka, Kafka Connect ships with pre-built Single Message Transforms and Predicates, but you can also write you own. The API for each is documented: Transformation / Predicate . The predicates that ship with Apache Kafka are:

RecordIsTombstone - The value part of the message is null (denoting a tombstone message)

HasHeaderKey - Matches if a header exists with the name given

TopicNameMatches - Matches based on topic

* * *

**Read more:** [🎄 Twelve Days of SMT 🎄 - Day 11: Predicate and Filter](https://rmoff.net/2020/12/22/twelve-days-of-smt-day-11-predicate-and-filter/)

---

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [9 February 2021 13:29 UTC](https://forum.confluent.io/t/new-blog-twelve-days-of-smt-day-11-predicate-and-filter/389/2 "2021-02-09T13:29:17Z")

</div>


