Class ConfigSchemaIdDeserializer
java.lang.Object
io.confluent.kafka.serializers.schema.id.ConfigSchemaIdDeserializer
- All Implemented Interfaces:
SchemaIdDeserializer,Closeable,AutoCloseable,org.apache.kafka.common.Configurable
A
ConfigSchemaIdDeserializer returns a schema ID that is configured using the property
"use.schema.id" or "use.schema.guid".-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserialize(String topic, boolean isKey, org.apache.kafka.common.header.Headers headers, byte[] payload, SchemaId schemaId) Deserialize the payload and set the schema identifier.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.confluent.kafka.serializers.schema.id.SchemaIdDeserializer
close
-
Field Details
-
USE_SCHEMA_ID
- See Also:
-
USE_SCHEMA_GUID
- See Also:
-
-
Constructor Details
-
ConfigSchemaIdDeserializer
public ConfigSchemaIdDeserializer()
-
-
Method Details
-
configure
- Specified by:
configurein interfaceorg.apache.kafka.common.Configurable- Specified by:
configurein interfaceSchemaIdDeserializer
-
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:SchemaIdDeserializerDeserialize the payload and set the schema identifier.- Specified by:
deserializein interfaceSchemaIdDeserializer- Parameters:
topic- topic associated with the payloadisKey- whether this is a record key or record valueheaders- headers associated with the record; may be empty.payload- serialized payload that may include a schema identifierschemaId- 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
-