Class AmqpMessageHeaderErrorMessageStrategy
java.lang.Object
org.springframework.integration.amqp.support.AmqpMessageHeaderErrorMessageStrategy
- All Implemented Interfaces:
ErrorMessageStrategy
public class AmqpMessageHeaderErrorMessageStrategy extends Object implements ErrorMessageStrategy
An
ErrorMessageStrategy extension that adds the raw AMQP message as
a header to the ErrorMessage.- Since:
- 4.3.10
- Author:
- Gary Russell, Artem Bilan
-
Field Summary
Fields Modifier and Type Field Description static StringAMQP_RAW_MESSAGEHeader name/retry context variable for the raw received message. -
Constructor Summary
Constructors Constructor Description AmqpMessageHeaderErrorMessageStrategy() -
Method Summary
Modifier and Type Method Description ErrorMessagebuildErrorMessage(Throwable throwable, AttributeAccessor context)Build the error message.
-
Field Details
-
AMQP_RAW_MESSAGE
Header name/retry context variable for the raw received message.- See Also:
- Constant Field Values
-
-
Constructor Details
-
AmqpMessageHeaderErrorMessageStrategy
public AmqpMessageHeaderErrorMessageStrategy()
-
-
Method Details
-
buildErrorMessage
Description copied from interface:ErrorMessageStrategyBuild the error message.- Specified by:
buildErrorMessagein interfaceErrorMessageStrategy- Parameters:
throwable- the payload.context- the attributes.- Returns:
- the ErrorMessage.
-