All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mitchseymour.kafka.serialization.avro.AvroSerdes Maven / Gradle / Ivy

package com.mitchseymour.kafka.serialization.avro;

import org.apache.avro.specific.SpecificRecordBase;
import org.apache.kafka.common.serialization.Serde;
import org.apache.kafka.common.serialization.Serdes;

public class AvroSerdes {
  private AvroSerdes() {
    // do not allow instantiation
  }

  public static  Serde get(Class clazz) {
    AvroSerializer serializer = new AvroSerializer<>(clazz);
    AvroDeserializer deserializer = new AvroDeserializer<>(clazz);
    return Serdes.serdeFrom(serializer, deserializer);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy