Kafka Connect SMT to replace the incoming message with a tombstone (null value) based on a predicate specifying JSON Path condition matching the events' key or value.
Please follow the instructions provided in https://docs.confluent.io/platform/current/connect/transforms/custom.html#custom-transformations
Dependency (when deploying you need to supply the JsonPath jar file along with the SMT): https://github.com/json-path/JsonPath
Name | Description | Type | Default | Importance |
---|---|---|---|---|
tombstoner.condition |
String specifying condition to match record to be replaced with tombstone | String | High |
transforms=tombstoner
transforms.tombstoner.type=com.github.thecrazymonkey.kafka.connect.smt.Tombstoner$Value
transforms.tombstoner.condition="$.headers[?(@.operation == 'DELETE')]"
transforms=tombstoner
transforms.tombstoner.type=com.github.thecrazymonkey.kafka.connect.smt.Tombstoner$Key
transforms.tombstoner.condition="$.headers[?(@.operation == 'DELETE')]"
Change the version
mvn versions:set -DnewVersion=1.3.0-SNAPSHOT
Build the package
mvn clean package
Inspired by Confluent® Filter
SMT
TODO - headers support?