public class DeserializationException extends KafkaException
KafkaException.Level| Constructor and Description |
|---|
DeserializationException(java.lang.String message,
byte[] data,
boolean isKey,
java.lang.Throwable cause)
Construct an instance with the provided properties.
|
DeserializationException(java.lang.String message,
org.apache.kafka.common.header.Headers headers,
byte[] data,
boolean isKey,
java.lang.Throwable cause)
Deprecated.
Headers are not set during construction.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getData()
Get the data that failed deserialization (value or key).
|
org.apache.kafka.common.header.Headers |
getHeaders()
Get the headers.
|
boolean |
isKey()
True if deserialization of the key failed, otherwise deserialization of the value
failed.
|
void |
setHeaders(org.apache.kafka.common.header.Headers headers)
Set the headers.
|
selfLogcontains, getMessage, getMostSpecificCause, getRootCausepublic DeserializationException(java.lang.String message,
byte[] data,
boolean isKey,
java.lang.Throwable cause)
message - the message.data - the data (value or key).isKey - true if the exception occurred while deserializing the key.cause - the cause.@Deprecated
public DeserializationException(java.lang.String message,
@Nullable
org.apache.kafka.common.header.Headers headers,
byte[] data,
boolean isKey,
java.lang.Throwable cause)
message - the message.headers - the headers.data - the data (value or key).isKey - true if the exception occurred while deserializing the key.cause - the cause.@Nullable public org.apache.kafka.common.header.Headers getHeaders()
public void setHeaders(@Nullable
org.apache.kafka.common.header.Headers headers)
headers - the headers.public byte[] getData()
public boolean isKey()