T
- the type of object created by the deserializer.public class DeserializerWrapper<T> extends Object implements org.apache.kafka.common.serialization.Deserializer<T>
Modifier and Type | Field and Description |
---|---|
static String |
DESERIALIZATION_FAILURE_CAUSE
Header name for deserialization failure cause if any.
|
static String |
DESERIALIZATION_FAILURE_DATA
Header name passing the data that was not able to be deserialized.
|
static String |
DESERIALIZATION_FAILURE_DESERIALIZER
Header name passing the class name of the underlying deserializer.
|
static String |
DESERIALIZATION_FAILURE_IS_KEY
Header name used when the deserialization failure happened on a key.
|
static String |
DESERIALIZATION_FAILURE_REASON
Header name for deserialization failure message.
|
static String |
DESERIALIZATION_FAILURE_TOPIC
Header name for the topic of the incoming message when a deserialization failure happen.
|
Constructor and Description |
---|
DeserializerWrapper(String className,
boolean key,
DeserializationFailureHandler<?> failureHandler,
KafkaSource<?,?> source) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
configure(Map<String,?> configs,
boolean isKey)
Delegates to the underlying deserializer instance.
|
T |
deserialize(String topic,
byte[] data) |
T |
deserialize(String topic,
org.apache.kafka.common.header.Headers headers,
byte[] data) |
public static final String DESERIALIZATION_FAILURE_REASON
public static final String DESERIALIZATION_FAILURE_CAUSE
public static final String DESERIALIZATION_FAILURE_IS_KEY
"true"
in this case,
absent otherwise.public static final String DESERIALIZATION_FAILURE_TOPIC
public static final String DESERIALIZATION_FAILURE_DATA
public static final String DESERIALIZATION_FAILURE_DESERIALIZER
public DeserializerWrapper(String className, boolean key, DeserializationFailureHandler<?> failureHandler, KafkaSource<?,?> source)
public void configure(Map<String,?> configs, boolean isKey)
configure
in interface org.apache.kafka.common.serialization.Deserializer<T>
configs
- the configurationisKey
- the keypublic T deserialize(String topic, byte[] data)
deserialize
in interface org.apache.kafka.common.serialization.Deserializer<T>
public T deserialize(String topic, org.apache.kafka.common.header.Headers headers, byte[] data)
deserialize
in interface org.apache.kafka.common.serialization.Deserializer<T>
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface org.apache.kafka.common.serialization.Deserializer<T>
Copyright © 2018–2021 SmallRye. All rights reserved.