Class DualSchemaIdDeserializer
java.lang.Object
io.confluent.kafka.serializers.schema.id.DualSchemaIdDeserializer
- All Implemented Interfaces:
SchemaIdDeserializer,Closeable,AutoCloseable,org.apache.kafka.common.Configurable
A
DualSchemaIdDeserializer first looks for a schema GUID in the header;
if not found it looks for a schema ID in the payload prefix.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(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, configure
-
Constructor Details
-
DualSchemaIdDeserializer
public DualSchemaIdDeserializer()
-
-
Method Details
-
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
-