Class ConfigSchemaIdDeserializer

java.lang.Object
io.confluent.kafka.serializers.schema.id.ConfigSchemaIdDeserializer
All Implemented Interfaces:
SchemaIdDeserializer, Closeable, AutoCloseable, org.apache.kafka.common.Configurable

public class ConfigSchemaIdDeserializer extends Object implements SchemaIdDeserializer
A ConfigSchemaIdDeserializer returns a schema ID that is configured using the property "use.schema.id" or "use.schema.guid".
  • Field Details

  • Constructor Details

    • ConfigSchemaIdDeserializer

      public ConfigSchemaIdDeserializer()
  • Method Details

    • configure

      public void configure(Map<String,?> configs)
      Specified by:
      configure in interface org.apache.kafka.common.Configurable
      Specified by:
      configure in interface SchemaIdDeserializer
    • deserialize

      public ByteBuffer deserialize(String topic, boolean isKey, org.apache.kafka.common.header.Headers headers, byte[] payload, SchemaId schemaId) throws org.apache.kafka.common.errors.SerializationException
      Description copied from interface: SchemaIdDeserializer
      Deserialize the payload and set the schema identifier.
      Specified by:
      deserialize in interface SchemaIdDeserializer
      Parameters:
      topic - topic associated with the payload
      isKey - whether this is a record key or record value
      headers - headers associated with the record; may be empty.
      payload - serialized payload that may include a schema identifier
      schemaId - schema identifier to be modified; either the ID or the GUID should be set
      Returns:
      the serialized payload that does not include a schema identifier
      Throws:
      org.apache.kafka.common.errors.SerializationException