Class KafkaException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BatchListenerFailedException, ConversionException, DeserializationException, KafkaBackoffException, KafkaProducerException, KafkaReplyTimeoutException, ListenerExecutionFailedException, TimestampedException

public class KafkaException extends NestedRuntimeException
The Spring for Apache Kafka specific NestedRuntimeException implementation.
Author:
Gary Russell, Artem Bilan
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, LogAccessor logger)
      Log this exception at its log level.
      Parameters:
      message - the message.
      logger - the log accessor.