Class HierarchicalSequencingPolicy

java.lang.Object
org.axonframework.messaging.eventhandling.sequencing.HierarchicalSequencingPolicy
All Implemented Interfaces:
SequencingPolicy

public class HierarchicalSequencingPolicy extends Object implements SequencingPolicy
Implementation of SequencingPolicy that combines two policies in a fallback pattern. When the primary policy fails to determine a sequence identifier for an event (returns Optional.empty()), this implementation will delegate to a secondary fallback policy.

This allows for composing sequencing strategies where certain event types might be handled by specialized policies, falling back to more generic approaches when specialized sequencing fails.

Since:
5.0.0
Author:
Mateusz Nowak