Class CloudEventsMaker

java.lang.Object
io.debezium.converters.spi.CloudEventsMaker

public abstract class CloudEventsMaker extends Object
An abstract class that builds CloudEvents attributes using fields of change records provided by RecordParser.
  • Field Details

    • SCHEMA_URL_PATH

      private static final String SCHEMA_URL_PATH
      See Also:
    • CLOUDEVENTS_SPECVERSION

      public static final String CLOUDEVENTS_SPECVERSION
      See Also:
    • dataContentType

      private final SerializerType dataContentType
    • dataSchemaUriBase

      private final String dataSchemaUriBase
    • ceDataAttributeSchema

      private final org.apache.kafka.connect.data.Schema ceDataAttributeSchema
    • recordParser

      protected final RecordParser recordParser
    • CONTENT_TYPE_NAME_MAP

      static final Map<SerializerType,String> CONTENT_TYPE_NAME_MAP
  • Constructor Details

  • Method Details

    • ceId

      public abstract String ceId()
      Construct the id of CloudEvents envelope.
      Returns:
      the id of CloudEvents envelope
    • ceSource

      public String ceSource(String logicalName)
      Construct the source field of CloudEvents envelope, e.g. "/debezium/postgres/dbserver1".
      Returns:
      the source field of CloudEvents envelope
    • ceSpecversion

      public String ceSpecversion()
      Get the version of CloudEvents specification.
      Returns:
      the version of CloudEvents specification
    • ceType

      public String ceType()
      Construct the type field of CloudEvents envelope.
      Returns:
      the type field of CloudEvents envelope
    • ceDatacontenttype

      public String ceDatacontenttype()
      Get the data content type of CloudEvents envelope.
      Returns:
      the data content type of CloudEvents envelope
    • ceDataschemaUri

      public String ceDataschemaUri(String schemaId)
      Get the data schema url of CloudEvents envelope.
      Returns:
      the data schema url of CloudEvents envelope
    • ceTime

      public String 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

      public String ceEnvelopeSchemaName()
      Construct the name of the schema of CloudEvents envelope.
      Returns:
      the name of the schema of CloudEvents envelope