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:
Serializable
- Direct Known Subclasses:
BatchListenerFailedException
,ConversionException
,DeserializationException
,KafkaBackoffException
,KafkaProducerException
,KafkaReplyTimeoutException
,ListenerExecutionFailedException
,TimestampedException
The Spring for Apache Kafka specific
NestedRuntimeException
implementation.- Author:
- Gary Russell, Artem Bilan
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionKafkaException
(String message) Construct an instance with the provided properties.KafkaException
(String message, Throwable cause) Construct an instance with the provided properties.KafkaException
(String message, KafkaException.Level level, Throwable cause) Construct an instance with the provided properties. -
Method Summary
Modifier and TypeMethodDescriptionvoid
selfLog
(String message, LogAccessor logger) Log this exception at its log level.Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMostSpecificCause, getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
KafkaException
Construct an instance with the provided properties.- Parameters:
message
- the message.
-
KafkaException
Construct an instance with the provided properties.- Parameters:
message
- the message.cause
- the cause.
-
KafkaException
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.
-
-
Method Details
-
selfLog
Log this exception at its log level.- Parameters:
message
- the message.logger
- the log accessor.
-