Package io.debezium.converters.spi
Class CloudEventsMaker
java.lang.Object
io.debezium.converters.spi.CloudEventsMaker
An abstract class that builds CloudEvents attributes using fields of change records provided by
RecordParser
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
The constants for the names of CloudEvents attributes. -
Field Summary
Modifier and TypeFieldDescriptionprivate final org.apache.kafka.connect.data.Schema
static final String
(package private) static final Map<SerializerType,
String> private final SerializerType
private final String
protected final RecordParser
private static final String
-
Constructor Summary
ModifierConstructorDescriptionprotected
CloudEventsMaker
(RecordParser parser, SerializerType contentType, String dataSchemaUriBase) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.kafka.connect.data.Struct
Construct the value of the data attribute of CloudEvents.org.apache.kafka.connect.data.Schema
Construct the schema of the data attribute of CloudEvents.Get the data content type of CloudEvents envelope.ceDataschemaUri
(String schemaId) Get the data schema url of CloudEvents envelope.Construct the name of the schema of CloudEvents envelope.abstract String
ceId()
Construct the id of CloudEvents envelope.Construct the source field of CloudEvents envelope, e.g.Get the version of CloudEvents specification.ceTime()
Get the timestamp of CloudEvents envelope using the format defined in RFC 3339.ceType()
Construct the type field of CloudEvents envelope.
-
Field Details
-
SCHEMA_URL_PATH
- See Also:
-
CLOUDEVENTS_SPECVERSION
- See Also:
-
dataContentType
-
dataSchemaUriBase
-
ceDataAttributeSchema
private final org.apache.kafka.connect.data.Schema ceDataAttributeSchema -
recordParser
-
CONTENT_TYPE_NAME_MAP
-
-
Constructor Details
-
CloudEventsMaker
protected CloudEventsMaker(RecordParser parser, SerializerType contentType, String dataSchemaUriBase)
-
-
Method Details
-
ceId
Construct the id of CloudEvents envelope.- Returns:
- the id of CloudEvents envelope
-
ceSource
Construct the source field of CloudEvents envelope, e.g. "/debezium/postgres/dbserver1".- Returns:
- the source field of CloudEvents envelope
-
ceSpecversion
Get the version of CloudEvents specification.- Returns:
- the version of CloudEvents specification
-
ceType
Construct the type field of CloudEvents envelope.- Returns:
- the type field of CloudEvents envelope
-
ceDatacontenttype
Get the data content type of CloudEvents envelope.- Returns:
- the data content type of CloudEvents envelope
-
ceDataschemaUri
Get the data schema url of CloudEvents envelope.- Returns:
- the data schema url of CloudEvents envelope
-
ceTime
Get the timestamp of CloudEvents envelope using the format defined in RFC 3339.- Returns:
- the timestamp of CloudEvents envelope
-
ceDataAttributeSchema
public org.apache.kafka.connect.data.Schema ceDataAttributeSchema()Construct the schema of the data attribute of CloudEvents.- Returns:
- the schema of the data attribute of CloudEvents
-
ceDataAttribute
public org.apache.kafka.connect.data.Struct ceDataAttribute()Construct the value of the data attribute of CloudEvents.- Returns:
- the value of the data attribute of CloudEvents
-
ceEnvelopeSchemaName
Construct the name of the schema of CloudEvents envelope.- Returns:
- the name of the schema of CloudEvents envelope
-