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
- Author:
- Tomaz Fernandes
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.kafka.KafkaException
KafkaException.Level
-
Constructor Summary
ConstructorDescriptionKafkaBackoffException
(String message, org.apache.kafka.common.TopicPartition topicPartition, String listenerId, long dueTimestamp) Constructor with data from the BackOff event. -
Method Summary
Modifier and TypeMethodDescriptionlong
org.apache.kafka.common.TopicPartition
Methods inherited from class org.springframework.kafka.KafkaException
selfLog
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
-
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()
-