Class WrappedNoSerializationErrorDeserializer<T>
java.lang.Object
org.sdase.commons.server.kafka.serializers.WrappedNoSerializationErrorDeserializer<T>
- Type Parameters:
T
- class to deserialize
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.kafka.common.serialization.Deserializer<T>
public class WrappedNoSerializationErrorDeserializer<T>
extends Object
implements org.apache.kafka.common.serialization.Deserializer<T>
A simple helper that delegates all deserialization calls to the wrapped deserializer given in the
constructor. Potential deserialization exceptions are caught, logged and null value is returned.
This helper can be used to workaround a known Kafka problem, see
https://issues.apache.org/jira/browse/KAFKA-4740.
-
Constructor Summary
ConstructorsConstructorDescriptionWrappedNoSerializationErrorDeserializer
(org.apache.kafka.common.serialization.Deserializer<T> deserializer) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.kafka.common.serialization.Deserializer
deserialize, deserialize
-
Constructor Details
-
WrappedNoSerializationErrorDeserializer
public WrappedNoSerializationErrorDeserializer(org.apache.kafka.common.serialization.Deserializer<T> deserializer)
-
-
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>
-
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>
-