Interface SchemaIdDeserializer
- All Superinterfaces:
AutoCloseable,Closeable,org.apache.kafka.common.Configurable
- All Known Implementing Classes:
ConfigSchemaIdDeserializer,DualSchemaIdDeserializer,PrefixSchemaIdDeserializer
A
SchemaIdDeserializer is used by a deserializer to determine how to deserialize
schema identifiers. It is invoked before the payload has been converted from bytes.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()default voiddeserialize(String topic, boolean isKey, org.apache.kafka.common.header.Headers headers, byte[] payload, SchemaId schemaId) Deserialize the payload and set the schema identifier.
-
Method Details
-
configure
- Specified by:
configurein interfaceorg.apache.kafka.common.Configurable
-
deserialize
ByteBuffer deserialize(String topic, boolean isKey, org.apache.kafka.common.header.Headers headers, byte[] payload, SchemaId schemaId) throws org.apache.kafka.common.errors.SerializationException Deserialize the payload and set the schema identifier.- 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
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-