R - the subtype of ConnectRecord on which this transformation will operatepublic class ExtractNewRecordState<R extends org.apache.kafka.connect.connector.ConnectRecord<R>> extends Object implements org.apache.kafka.connect.transforms.Transformation<R>
Envelope) records that are struct of values containing values
before and after change. Sink connectors usually are not able to work
with a complex structure so a user use this SMT to extract after value and send it down
unwrapped in Envelope.
The functionality is similar to ExtractField SMT but has a special semantics for handling
delete events; when delete event is emitted by database then Debezium emits two messages: a delete
message and a tombstone message that serves as a signal to Kafka compaction process.
The SMT by default drops the tombstone message created by Debezium and converts the delete message into a tombstone message that can be dropped, too, if required.
| Modifier and Type | Field and Description |
|---|---|
private boolean |
addOperationHeader |
private org.apache.kafka.connect.transforms.ExtractField<R> |
afterDelegate |
private org.apache.kafka.connect.transforms.ExtractField<R> |
beforeDelegate |
private boolean |
dropTombstones |
private static String |
ENVELOPE_SCHEMA_NAME_SUFFIX |
private ExtractNewRecordStateConfigDefinition.DeleteHandling |
handleDeletes |
private static org.slf4j.Logger |
LOGGER |
private org.apache.kafka.connect.transforms.InsertField<R> |
removedDelegate |
private org.apache.kafka.connect.transforms.InsertField<R> |
updatedDelegate |
| Constructor and Description |
|---|
ExtractNewRecordState() |
| Modifier and Type | Method and Description |
|---|---|
R |
apply(R record) |
void |
close() |
org.apache.kafka.common.config.ConfigDef |
config() |
void |
configure(Map<String,?> configs) |
private static final String ENVELOPE_SCHEMA_NAME_SUFFIX
private static final org.slf4j.Logger LOGGER
private boolean dropTombstones
private ExtractNewRecordStateConfigDefinition.DeleteHandling handleDeletes
private boolean addOperationHeader
private final org.apache.kafka.connect.transforms.ExtractField<R extends org.apache.kafka.connect.connector.ConnectRecord<R>> afterDelegate
private final org.apache.kafka.connect.transforms.ExtractField<R extends org.apache.kafka.connect.connector.ConnectRecord<R>> beforeDelegate
private final org.apache.kafka.connect.transforms.InsertField<R extends org.apache.kafka.connect.connector.ConnectRecord<R>> removedDelegate
Copyright © 2019 JBoss by Red Hat. All rights reserved.