Class IdempotentReceiverInterceptor

All Implemented Interfaces:
Advice, Interceptor, MethodInterceptor, Aware, BeanFactoryAware, BeanNameAware, InitializingBean, ApplicationContextAware, ExpressionCapable, HandleMessageAdvice, NamedComponent

public class IdempotentReceiverInterceptor
extends AbstractHandleMessageAdvice
The MethodInterceptor implementation for the Idempotent Receiver E.I. Pattern.

This MethodInterceptor works like a MessageFilter if discardChannel is provided or throwExceptionOnRejection is set to true. However if those properties aren't provided, this interceptor will create an new Message with a IntegrationMessageHeaderAccessor.DUPLICATE_MESSAGE header when the requestMessage isn't accepted by MessageSelector.

The idempotent filtering logic depends on the provided MessageSelector.

This class is designed to be used only for the MessageHandler.handleMessage(org.springframework.messaging.Message<?>), method.

Since:
4.1
Author:
Artem Bilan, Gary Russell
See Also:
MetadataStoreSelector, IdempotentReceiverAutoProxyCreatorInitializer