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

    Constructors
    Constructor
    Description
    Constructor used by Kafka consumer.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    configure(Map<String,?> configs, boolean isKey)
     
    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

      public void configure(Map<String,?> configs, boolean isKey)
      Specified by:
      configure in interface org.apache.kafka.common.serialization.Deserializer<org.apache.avro.generic.GenericRecord>
    • deserialize

      public org.apache.avro.generic.GenericRecord deserialize(String topic, byte[] data)
      Specified by:
      deserialize in interface org.apache.kafka.common.serialization.Deserializer<org.apache.avro.generic.GenericRecord>