Class DeserializationErrorHandlingJsonSerde<T>

java.lang.Object
io.confluent.security.store.kafka.clients.JsonSerde<T>
io.confluent.security.store.kafka.clients.DeserializationErrorHandlingJsonSerde<T>
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.kafka.common.Configurable, org.apache.kafka.common.serialization.Deserializer<T>, org.apache.kafka.common.serialization.Serde<T>, org.apache.kafka.common.serialization.Serializer<T>

public class DeserializationErrorHandlingJsonSerde<T> extends JsonSerde<T>
ErrorHandlingJsonSerde that catches exceptions while deserializing key/value of the records and returns the value as per the user provided handleDeserializationExceptionFunction
  • Method Details

    • configure

      public void configure(Map<String,?> configs, boolean isKey)
      Specified by:
      configure in interface org.apache.kafka.common.serialization.Deserializer<T>
      Specified by:
      configure in interface org.apache.kafka.common.serialization.Serde<T>
      Specified by:
      configure in interface org.apache.kafka.common.serialization.Serializer<T>
      Overrides:
      configure in class JsonSerde<T>
    • deserialize

      public T deserialize(String topic, org.apache.kafka.common.header.Headers headers, byte[] data)
    • deserialize

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

      public static <T> DeserializationErrorHandlingJsonSerde<T> serde(Class<T> clazz, boolean isKey, Function<DeserializationErrorHandlingJsonSerde.DeserializationError, T> handleDeserializationExceptionFunction)