Class KafkaBackoffException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.kafka.KafkaException
org.springframework.kafka.listener.KafkaBackoffException
- All Implemented Interfaces:
Serializable
Exception thrown when the consumer should not yet consume the message due to backOff.
- Since:
- 2.7
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.kafka.KafkaException
KafkaException.Level -
Constructor Summary
ConstructorsConstructorDescriptionKafkaBackoffException(String message, org.apache.kafka.common.TopicPartition topicPartition, String listenerId, long dueTimestamp) Constructor with data from the BackOff event. -
Method Summary
Modifier and TypeMethodDescriptionlongorg.apache.kafka.common.TopicPartitionMethods inherited from class org.springframework.kafka.KafkaException
selfLogMethods inherited from class org.springframework.core.NestedRuntimeException
contains, getMostSpecificCause, getRootCauseMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
KafkaBackoffException
public KafkaBackoffException(String message, org.apache.kafka.common.TopicPartition topicPartition, String listenerId, long dueTimestamp) Constructor with data from the BackOff event.- Parameters:
message- the error message.topicPartition- the partition that was backed off.listenerId- the listenerId for the consumer that was backed off.dueTimestamp- the time at which the message should be consumed.
-
-
Method Details
-
getListenerId
-
getTopicPartition
public org.apache.kafka.common.TopicPartition getTopicPartition() -
getDueTimestamp
public long getDueTimestamp()
-