Class PersistentStreamSequencingPolicyProvider
java.lang.Object
org.axonframework.axonserver.connector.event.axon.PersistentStreamSequencingPolicyProvider
- All Implemented Interfaces:
Function<Configuration,SequencingPolicy<? super EventMessage<?>>>
public class PersistentStreamSequencingPolicyProvider
extends Object
implements Function<Configuration,SequencingPolicy<? super EventMessage<?>>>
A provider of
SequencingPolicies for a given Configuration.
The provided SequencingPolicy for a given Configuration returns a sequencing key for an event to
identify which sequence/stream the event belongs to. The policy is only used for when a dead letter queue is
attached to the processors consuming from a Persistent Stream.
- Since:
- 4.10.0
- Author:
- Marc Gathier
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAStringconstant representing the full concurrency policy.static final StringAStringconstant representing the "meta-data" sequencing policy.static final StringAStringconstant representing the property sequencing policy.static final StringAStringconstant representing the "sequential per aggregate" sequencing policy.static final StringAStringconstant representing the sequential policy. -
Constructor Summary
ConstructorsConstructorDescriptionPersistentStreamSequencingPolicyProvider(String name, String sequencingPolicy, List<String> sequencingPolicyParameters) Instantiates aPersistentStreamSequencingPolicyProviderbased on the given parameters. -
Method Summary
-
Field Details
-
SEQUENTIAL_PER_AGGREGATE_POLICY
AStringconstant representing the "sequential per aggregate" sequencing policy. This means all events belonging to the same aggregate are handled sequentially. The behavior of this policy resembles theSequentialPerAggregatePolicy.- See Also:
-
META_DATA_SEQUENCING_POLICY
AStringconstant representing the "meta-data" sequencing policy. The policy utilizes values present in the metadata of an event to define the sequence identifier.- See Also:
-
SEQUENTIAL_POLICY
AStringconstant representing the sequential policy. This means all events are handled sequentially. The behavior of this policy resembles theSequentialPolicy.- See Also:
-
FULL_CONCURRENCY_POLICY
AStringconstant representing the full concurrency policy. This means all events are spread out over the available segments, regardless of the sequence identifier. The behavior of this policy resembles theFullConcurrencyPolicy.- See Also:
-
PROPERTY_SEQUENCING_POLICY
AStringconstant representing the property sequencing policy. This policy retrieves a value from the event's payload to decide the sequence identifier of the event. The behavior of this policy resembles thePropertySequencingPolicy.- See Also:
-
-
Constructor Details
-
PersistentStreamSequencingPolicyProvider
public PersistentStreamSequencingPolicyProvider(String name, String sequencingPolicy, List<String> sequencingPolicyParameters) Instantiates aPersistentStreamSequencingPolicyProviderbased on the given parameters.- Parameters:
name- The processor name.sequencingPolicy- The name of the sequencing policy.sequencingPolicyParameters- Parameters for the sequencing policy.
-
-
Method Details
-
apply
- Specified by:
applyin interfaceFunction<Configuration,SequencingPolicy<? super EventMessage<?>>>
-