Class KafkaAvroDecoder

All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.kafka.tools.api.Decoder<Object>

public class KafkaAvroDecoder extends AbstractKafkaAvroDeserializer implements org.apache.kafka.tools.api.Decoder<Object>
  • Constructor Details

    • KafkaAvroDecoder

      public KafkaAvroDecoder(SchemaRegistryClient schemaRegistry)
    • KafkaAvroDecoder

      public KafkaAvroDecoder(SchemaRegistryClient schemaRegistry, kafka.utils.VerifiableProperties props)
    • KafkaAvroDecoder

      public KafkaAvroDecoder(kafka.utils.VerifiableProperties props)
      Constructor used by Kafka consumer.
  • Method Details

    • fromBytes

      public Object fromBytes(byte[] bytes)
      Specified by:
      fromBytes in interface org.apache.kafka.tools.api.Decoder<Object>
    • fromBytes

      public Object fromBytes(byte[] bytes, org.apache.avro.Schema readerSchema)
      Pass a reader schema to get an Avro projection
    • fromBytes

      public Object fromBytes(org.apache.kafka.common.header.Headers headers, byte[] bytes)
    • fromBytes

      public Object fromBytes(org.apache.kafka.common.header.Headers headers, byte[] bytes, org.apache.avro.Schema readerSchema)
      Pass a reader schema to get an Avro projection