Kafka Connect EventRouter (Debezium) SMT for Confluent Platform

This document provides Confluent Cloud managed connector usage information for the Debezium SMT io.debezium.transforms.outbox.EventRouter. This is an open source SMT.

Important

EventRouter is only available for managed Debezium connectors on Confluent Cloud.

With the exception of the following changes for Confluent Cloud, Debezium’s open source documentation contains the usage information to support you in using this SMT with managed Confluent Cloud Debezium connectors.

Event Router Configuration Options

EventRouter SMT UI

Usage differences

Note the following differences between the Confluent Cloud implementation and the original Debezium SMT:

Regex pattern matching
The Confluent Cloud uses the Google RE2/J regular expression engine instead of the native Java regex library. This is the same regex package that TopicRegexRouter uses.
route.topic.regex
The default for route.topic.regex is slightly modified, from "(?<routedByValue>.*)" to "(?P<routedByValue>.*)" . This modification is required because capture groups and backreferences in RE2/J use Python regex syntax. For more information on capture groups and back references, see Named Capturing Groups and Backreferences.
Record format

The records coming from managed Debezium CDC connectors must be in the correct format. Note that the nested structure has a before and after state. By default, the after state is output as a top level object and the rest is removed. On Confluent Cloud, this behavior can be disabled by setting the after.state.only property to false.

See the following example record format.

{
 "before": null,
 "after": {
   "id": 5,
   "name": "Allen William Henry",
   "sex": "male",
   "age": 25,
   "sibsp": 0,
   "parch": 0,
   "created_at": "2018-01-02T15:22:14.831461Z"
 },
 "source": {
   "version": "1.3.1.Final",
   "connector": "postgresql",
   "name": "test",
   "ts_ms": 1621389097781,
   "snapshot": "false",
   "db": "postgres",
   "schema": "public",
   "table": "passengers",
   "txId": 572,
   "lsn": 872429856,
   "xmin": null
 },
 "op": "u",
 "ts_ms": 1621389098688,
 "transaction": null
}

Configuration options

For complete configuration option details, see the Debezium docs.

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.