Class ListenerExecutionFailedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.kafka.KafkaException
org.springframework.kafka.listener.ListenerExecutionFailedException
- All Implemented Interfaces:
Serializable
The listener specific
KafkaException
extension.- Author:
- Gary Russell
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.kafka.KafkaException
KafkaException.Level
-
Constructor Summary
ConstructorDescriptionListenerExecutionFailedException
(String message) Construct an instance with the provided properties.ListenerExecutionFailedException
(String message, String groupId, Throwable cause) Construct an instance with the provided properties.ListenerExecutionFailedException
(String message, Throwable cause) Construct an instance with the provided properties. -
Method Summary
Modifier and TypeMethodDescriptionReturn the consumer group.id property of the container that threw this exception.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
-
ListenerExecutionFailedException
Construct an instance with the provided properties.- Parameters:
message
- the exception message.
-
ListenerExecutionFailedException
Construct an instance with the provided properties.- Parameters:
message
- the exception message.cause
- the cause.
-
ListenerExecutionFailedException
public ListenerExecutionFailedException(String message, @Nullable String groupId, @Nullable Throwable cause) Construct an instance with the provided properties.- Parameters:
message
- the exception message.groupId
- the container's group.id property.cause
- the cause.- Since:
- 2.2.4
-
-
Method Details
-
getGroupId
Return the consumer group.id property of the container that threw this exception.- Returns:
- the group id; may be null, but not when the exception is passed to an error handler by a listener container.
- Since:
- 2.2.4
-