Kafka Connect DropHeaders SMT for Confluent Platform

The following provides usage information for the Apache Kafka® SMT org.apache.kafka.connect.transforms.DropHeaders.

Caution

DropHeaders is not currently available for managed connectors.

Description

Drops one or more headers from each record.

Example

This configuration snippet shows how to use DropHeaders to drop the headers named app.id and txn.id.

"transforms": "dropAppIdHeader",
"transforms.dropAppIdHeader.type": "org.apache.kafka.connect.transforms.DropHeaders",
"transforms.dropAppIdHeader.headers": "app.id,txn.id"

Before: Headers app.id and txn.id included in records.

After: Headers app.id and txn.id dropped from records.

Properties

Name Description Type   Valid Values Importance
headers One or more (comma-separated) header names to drop. string   non-empty list medium

Predicates

Transformations can be configured with predicates so that the transformation is applied only to records which satisfy a condition. You can use predicates in a transformation chain and, when combined with the Kafka Connect Filter (Kafka) SMT for Confluent Platform, predicates can conditionally filter out specific records. For details and examples, see Predicates.