R - the subtype of ConnectRecord on which this transformation will operatepublic class UnwrapFromEnvelope<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 org.apache.kafka.connect.transforms.ExtractField<R> |
delegate |
private static Field |
DROP_DELETES |
private static Field |
DROP_TOMBSTONES |
private boolean |
dropDeletes |
private boolean |
dropTombstones |
private static String |
ENVELOPE_SCHEMA_NAME_SUFFIX |
private org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
UnwrapFromEnvelope() |
| 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 final org.slf4j.Logger logger
private static final Field DROP_TOMBSTONES
private static final Field DROP_DELETES
private boolean dropTombstones
private boolean dropDeletes
Copyright © 2018 JBoss by Red Hat. All rights reserved.