Class CommandSequencingInterceptor<M extends CommandMessage>

java.lang.Object
org.axonframework.messaging.commandhandling.interception.CommandSequencingInterceptor<M>
Type Parameters:
M - the Message type this interceptor can process
All Implemented Interfaces:
MessageHandlerInterceptor<M>

public class CommandSequencingInterceptor<M extends CommandMessage> extends Object implements MessageHandlerInterceptor<M>
A MessageHandlerInterceptor implementation to sequence command execution.

Commands are sequenced based on a SequencingPolicy that specifies how to determine the sequence identifier from the CommandMessage that is being intercepted. Commands with the same sequence identifier will be executed sequentially, meaning that a command will wait for the previous command with the same identifier to complete before starting execution. Commands with different sequence identifiers can be executed concurrently.

Commands for which the policy returns Optional.empty() as sequence identifier will proceed without any sequencing constraints.

Since:
5.0.3
Author:
Jakob Hatzl