Package com.hazelcast.jet.kafka
Class HazelcastKafkaAvroDeserializer
java.lang.Object
com.hazelcast.jet.kafka.impl.AbstractHazelcastAvroSerde
com.hazelcast.jet.kafka.HazelcastKafkaAvroDeserializer
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.kafka.common.serialization.Deserializer<org.apache.avro.generic.GenericRecord>
public class HazelcastKafkaAvroDeserializer
extends com.hazelcast.jet.kafka.impl.AbstractHazelcastAvroSerde
implements org.apache.kafka.common.serialization.Deserializer<org.apache.avro.generic.GenericRecord>
An Avro deserializer for Kafka. Unlike
io.confluent.kafka.serializers.KafkaAvroDeserializer
,
this deserializer does not use a schema registry. Instead, it obtains the schema from mapping
options and use it for all messages. Consequently, the messages consumed by this deserializer
must not include a schema id (and also "magic byte").- Since:
- 5.4
- See Also:
-
Field Summary
Fields inherited from class com.hazelcast.jet.kafka.impl.AbstractHazelcastAvroSerde
OPTION_KEY_AVRO_SCHEMA, OPTION_VALUE_AVRO_SCHEMA
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
org.apache.avro.generic.GenericRecord
deserialize
(String topic, byte[] data) Methods inherited from class com.hazelcast.jet.kafka.impl.AbstractHazelcastAvroSerde
getSchema
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.kafka.common.serialization.Deserializer
close, deserialize, deserialize
-
Constructor Details
-
HazelcastKafkaAvroDeserializer
public HazelcastKafkaAvroDeserializer()Constructor used by Kafka consumer.
-
-
Method Details
-
configure
- Specified by:
configure
in interfaceorg.apache.kafka.common.serialization.Deserializer<org.apache.avro.generic.GenericRecord>
-
deserialize
- Specified by:
deserialize
in interfaceorg.apache.kafka.common.serialization.Deserializer<org.apache.avro.generic.GenericRecord>
-