@FunctionalInterface public interface ErrorMessageStrategy
ErrorMessage
based on the provided
Throwable
and AttributeAccessor
as a context.
The Throwable payload
is typically MessagingException
which failedMessage
property can be used to determine a cause of the error.
This strategy can be used for the
ErrorMessageSendingRecoverer
for RetryContext
access.
Modifier and Type | Method and Description |
---|---|
ErrorMessage |
buildErrorMessage(Throwable payload,
AttributeAccessor attributes)
Build the error message.
|
ErrorMessage buildErrorMessage(Throwable payload, @Nullable AttributeAccessor attributes)
payload
- the payload.attributes
- the attributes.