Class RetryingDeserializer<T>
- java.lang.Object
-
- org.springframework.kafka.support.serializer.RetryingDeserializer<T>
-
- Type Parameters:
T
- Type to be deserialized into.
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,org.apache.kafka.common.serialization.Deserializer<T>
public class RetryingDeserializer<T> extends java.lang.Object implements org.apache.kafka.common.serialization.Deserializer<T>
A deserialzer configured with a delegate and aRetryOperations
to retry deserialization in case of transient errors.- Since:
- 2.3
- Author:
- Gary Russell
-
-
Constructor Summary
Constructors Constructor Description RetryingDeserializer(org.apache.kafka.common.serialization.Deserializer<T> delegate, org.springframework.retry.RetryOperations retryOperations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
configure(java.util.Map<java.lang.String,?> configs, boolean isKey)
T
deserialize(java.lang.String topic, byte[] data)
T
deserialize(java.lang.String topic, org.apache.kafka.common.header.Headers headers, byte[] data)
-
-
-
Constructor Detail
-
RetryingDeserializer
public RetryingDeserializer(org.apache.kafka.common.serialization.Deserializer<T> delegate, org.springframework.retry.RetryOperations retryOperations)
-
-
Method Detail
-
configure
public void configure(java.util.Map<java.lang.String,?> configs, boolean isKey)
- Specified by:
configure
in interfaceorg.apache.kafka.common.serialization.Deserializer<T>
-
deserialize
public T deserialize(java.lang.String topic, byte[] data)
- Specified by:
deserialize
in interfaceorg.apache.kafka.common.serialization.Deserializer<T>
-
deserialize
public T deserialize(java.lang.String topic, org.apache.kafka.common.header.Headers headers, byte[] data)
- Specified by:
deserialize
in interfaceorg.apache.kafka.common.serialization.Deserializer<T>
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfaceorg.apache.kafka.common.serialization.Deserializer<T>
-
-