Interface CloudEventsProvider


  • public interface CloudEventsProvider
    A ServiceLoader interface that connectors should implement if they wish to provide a way to emit change events using the CloudEvents converter and format.
    Author:
    Chris Cranford
    • Method Detail

      • getName

        String getName()
        The connector name specified in the record's source info block.
        Returns:
        the provider name
      • createParser

        RecordParser createParser​(org.apache.kafka.connect.data.Schema schema,
                                  org.apache.kafka.connect.data.Struct record)
        Create a concrete parser of a change record for the connector.
        Parameters:
        schema - the schema of the record
        record - the value of the record
        Returns:
        a concrete parser
      • createMaker

        CloudEventsMaker createMaker​(RecordParser parser,
                                     SerializerType contentType,
                                     String dataSchemaUriBase)
        Create a concrete CloudEvents maker using the outputs of a record parser. Also need to specify the data content type (that is the serialization format of the data attribute).
        Parameters:
        parser - the parser of a change record
        contentType - the data content type of CloudEvents
        dataSchemaUriBase - the URI of the schema in case of Avro; may be null
        Returns:
        a concrete CloudEvents maker