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 deserialzer configured with a delegate and a
RetryOperations
to retry
deserialization in case of transient errors.- Since:
- 2.3
- Author:
- Gary Russell
-
Constructor Summary
ConstructorDescriptionRetryingDeserializer
(org.apache.kafka.common.serialization.Deserializer<T> delegate, org.springframework.retry.RetryOperations retryOperations) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
deserialize
(String topic, byte[] data) deserialize
(String topic, org.apache.kafka.common.header.Headers headers, byte[] data)
-
Constructor Details
-
RetryingDeserializer
public RetryingDeserializer(org.apache.kafka.common.serialization.Deserializer<T> delegate, org.springframework.retry.RetryOperations retryOperations)
-
-
Method Details
-
configure
- Specified by:
configure
in interfaceorg.apache.kafka.common.serialization.Deserializer<T>
-
deserialize
- Specified by:
deserialize
in interfaceorg.apache.kafka.common.serialization.Deserializer<T>
-
deserialize
- Specified by:
deserialize
in interfaceorg.apache.kafka.common.serialization.Deserializer<T>
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceorg.apache.kafka.common.serialization.Deserializer<T>
-