Interface ErrorMessageStrategy
- All Known Implementing Classes:
AmqpMessageHeaderErrorMessageStrategy
,DefaultErrorMessageStrategy
,RawRecordHeaderErrorMessageStrategy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A strategy to build an
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.
- Since:
- 4.3.10
- Author:
- Artem Bilan, Gary Russell
-
Method Summary
Modifier and TypeMethodDescriptionbuildErrorMessage
(Throwable payload, AttributeAccessor attributes) Build the error message.
-
Method Details
-
buildErrorMessage
Build the error message.- Parameters:
payload
- the payload.attributes
- the attributes.- Returns:
- the ErrorMessage.
-