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

public class KafkaException extends org.springframework.core.NestedRuntimeException
The Spring for Apache Kafka specific NestedRuntimeException implementation.
See Also:
  • Constructor Details

    • KafkaException

      public KafkaException(String message)
      Construct an instance with the provided properties.
      Parameters:
      message - the message.
    • KafkaException

      public KafkaException(String message, @Nullable Throwable cause)
      Construct an instance with the provided properties.
      Parameters:
      message - the message.
      cause - the cause.
    • KafkaException

      public KafkaException(String message, KafkaException.Level level, @Nullable Throwable cause)
      Construct an instance with the provided properties.
      Parameters:
      message - the message.
      level - the level at which this exception should be logged when using selfLog(String, LogAccessor).
      cause - the cause.
  • Method Details

    • selfLog

      public void selfLog(String message, org.springframework.core.log.LogAccessor logger)
      Log this exception at its log level.
      Parameters:
      message - the message.
      logger - the log accessor.