Class ReflectionAvroDeserializer<T>

java.lang.Object
io.confluent.kafka.streams.serdes.avro.ReflectionAvroDeserializer<T>
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.kafka.common.serialization.Deserializer<T>

public class ReflectionAvroDeserializer<T> extends Object implements org.apache.kafka.common.serialization.Deserializer<T>
A schema-registry aware deserializer for reading data in "reflection Avro" format.

This deserializer assumes that the serialized data was written in the wire format defined at http://docs.confluent.io/current/schema-registry/docs/serializer-formatter.html#wire-format. It requires access to a Confluent Schema Registry endpoint, which you must configure(Map, boolean) via the parameter "schema.registry.url".

See ReflectionAvroSerializer for its serializer counterpart.

  • Constructor Details

    • ReflectionAvroDeserializer

      public ReflectionAvroDeserializer()
    • ReflectionAvroDeserializer

      public ReflectionAvroDeserializer(Class<T> type)
  • Method Details

    • configure

      public void configure(Map<String,?> deserializerConfig, boolean isDeserializerForRecordKeys)
      Specified by:
      configure in interface org.apache.kafka.common.serialization.Deserializer<T>
    • deserialize

      public T deserialize(String topic, byte[] bytes)
      Specified by:
      deserialize in interface org.apache.kafka.common.serialization.Deserializer<T>
    • deserialize

      public T deserialize(String topic, org.apache.kafka.common.header.Headers headers, byte[] bytes)
      Specified by:
      deserialize in interface org.apache.kafka.common.serialization.Deserializer<T>
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.apache.kafka.common.serialization.Deserializer<T>