Class AbstractJacksonKafkaAvroSerializer

java.lang.Object
io.confluent.kafka.serializers.AbstractKafkaSchemaSerDe
io.github.productboardlabs.kafka.serializers.AbstractJacksonKafkaAvroSerializer
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.kafka.common.serialization.Serializer<Object>
Direct Known Subclasses:
DefaultJacksonKafkaAvroSerializer

public abstract class AbstractJacksonKafkaAvroSerializer extends io.confluent.kafka.serializers.AbstractKafkaSchemaSerDe implements org.apache.kafka.common.serialization.Serializer<Object>
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.confluent.kafka.serializers.AbstractKafkaSchemaSerDe

    io.confluent.kafka.serializers.AbstractKafkaSchemaSerDe.SubjectSchema
  • Field Summary

    Fields inherited from class io.confluent.kafka.serializers.AbstractKafkaSchemaSerDe

    contextNameStrategy, idSize, keySubjectNameStrategy, latestVersions, MAGIC_BYTE, schemaRegistry, useSchemaReflection, valueSubjectNameStrategy
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    configure(Map<String,?> configs, boolean isKey)
     
    protected @NotNull com.fasterxml.jackson.dataformat.avro.AvroMapper
     
    protected abstract @NotNull SchemaMetadata
    getSchemaFor(@NotNull String topic, @NotNull Object value)
     
    byte[]
    serialize(String topic, Object data)
     
    byte[]
    serialize(String topic, org.apache.kafka.common.header.Headers headers, Object data)
     

    Methods inherited from class io.confluent.kafka.serializers.AbstractKafkaSchemaSerDe

    configureClientProperties, getById, getBySubjectAndId, getByteBuffer, getContextName, getContextName, getOldSubjectName, getSchemaById, getSchemaBySubjectAndId, getSubjectName, isDeprecatedSubjectNameStrategy, lookupLatestVersion, lookupLatestVersion, lookupSchemaBySubjectAndId, register, register, register, strategyUsesSchema, toKafkaException

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractJacksonKafkaAvroSerializer

      public AbstractJacksonKafkaAvroSerializer()
  • Method Details

    • getSchemaFor

      @NotNull protected abstract @NotNull SchemaMetadata getSchemaFor(@NotNull @NotNull String topic, @NotNull @NotNull Object value)
    • createAvroMapper

      @NotNull protected @NotNull com.fasterxml.jackson.dataformat.avro.AvroMapper createAvroMapper()
    • configure

      public void configure(Map<String,?> configs, boolean isKey)
      Specified by:
      configure in interface org.apache.kafka.common.serialization.Serializer<Object>
    • serialize

      public byte[] serialize(String topic, Object data)
      Specified by:
      serialize in interface org.apache.kafka.common.serialization.Serializer<Object>
    • serialize

      public byte[] serialize(String topic, org.apache.kafka.common.header.Headers headers, Object data)
      Specified by:
      serialize in interface org.apache.kafka.common.serialization.Serializer<Object>
    • 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.Serializer<Object>