Package org.springframework.kafka
Class KafkaException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.springframework.core.NestedRuntimeException
-
- org.springframework.kafka.KafkaException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
BatchListenerFailedException
,ConversionException
,DeserializationException
,KafkaBackoffException
,KafkaProducerException
,KafkaReplyTimeoutException
,ListenerExecutionFailedException
,TimestampedException
public class KafkaException extends org.springframework.core.NestedRuntimeException
The Spring for Apache Kafka specificNestedRuntimeException
implementation.- Author:
- Gary Russell, Artem Bilan
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KafkaException.Level
The log level forKafkaException
.
-
Constructor Summary
Constructors Constructor Description KafkaException(java.lang.String message)
Construct an instance with the provided properties.KafkaException(java.lang.String message, java.lang.Throwable cause)
Construct an instance with the provided properties.KafkaException(java.lang.String message, KafkaException.Level level, java.lang.Throwable cause)
Construct an instance with the provided properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
selfLog(java.lang.String message, org.springframework.core.log.LogAccessor logger)
Log this exception at its log level.-
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
-
-
-
-
Constructor Detail
-
KafkaException
public KafkaException(java.lang.String message)
Construct an instance with the provided properties.- Parameters:
message
- the message.
-
KafkaException
public KafkaException(java.lang.String message, @Nullable java.lang.Throwable cause)
Construct an instance with the provided properties.- Parameters:
message
- the message.cause
- the cause.
-
KafkaException
public KafkaException(java.lang.String message, KafkaException.Level level, @Nullable java.lang.Throwable cause)
Construct an instance with the provided properties.- Parameters:
message
- the message.level
- the level at which this exception should be logged when usingselfLog(String, LogAccessor)
.cause
- the cause.
-
-