Class RetryingDeserializer<T>

java.lang.Object
org.springframework.kafka.support.serializer.RetryingDeserializer<T>
Type Parameters:
T - Type to be deserialized into.
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.kafka.common.serialization.Deserializer<T>

public class RetryingDeserializer<T> extends Object implements org.apache.kafka.common.serialization.Deserializer<T>
A deserializer configured with a delegate and a RetryOperations to retry deserialization in case of transient errors.
Since:
2.3
Author:
Gary Russell
  • Constructor Details

    • RetryingDeserializer

      public RetryingDeserializer(org.apache.kafka.common.serialization.Deserializer<T> delegate, org.springframework.retry.RetryOperations retryOperations)
  • Method Details

    • configure

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

      public T deserialize(String topic, byte[] data)
      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[] data)
      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>