Class CorrelationDataInterceptor<M extends Message>

java.lang.Object
org.axonframework.messaging.core.interception.CorrelationDataInterceptor<M>
Type Parameters:
M - The message type this interceptor can process.
All Implemented Interfaces:
MessageDispatchInterceptor<M>, MessageHandlerInterceptor<M>

@Internal public class CorrelationDataInterceptor<M extends Message> extends Object implements MessageDispatchInterceptor<M>, MessageHandlerInterceptor<M>
A MessageDispatchInterceptor and MessageHandlerInterceptor implementation using CorrelationDataProviders to collect and set a collection of correlation data.

The correlation data is registered with the ProcessingContext upon interception of a message under Context.ResourceKey CORRELATION_DATA. On interceptOnDispatch(Message, ProcessingContext, MessageDispatchInterceptorChain), the ProcessingContext is checked for the existence of this resource. When present, the given Message receive the correlation data as additional Metadata.

Users can expect that this CorrelationDataInterceptor is always set for the user to ensure any correlation data is present at all time.

Since:
3.0.0
Author:
Rene de Waele, Steven van Beelen