public final class EventSourcingBuilder extends Object
An event sourcing action is an action that is processed as a simple sourcing command against an aggregate.
Simple sourcing records the version number of an aggregate, called a sequence number, and every successful command results in this sequence number being incremented. The event sourcing action processor will ensure that only the saga can write to the aggregate, and if any other writes to the aggregate occur during the saga, the saga will fail. An optimistic lock is essentially held on the aggregate for the duration of the saga.
|Constructor and Description|
|Modifier and Type||Method and Description|
A static function that returns an action processor build step that: 1.
public static <A,D,K,C> ActionProcessorBuildStep<A> apply(EventSourcingSpec<A,D,K,C> esSpec, TopicConfigBuilder.BuildSteps actionTopicBuilder, TopicConfigBuilder.BuildSteps commandTopicBuilder)
A- - common representation form for all action commands (typically Json / GenericRecord for Avro)
D- - intermediate decoded input type (that can easily be converted to both K and C)
K- - aggregate key type
C- - simple sourcing command type
esSpec- data structure specifying how to turn the action request into a command request and interpret the result
actionTopicBuilder- the action topic builder - a mechanism for configuring the action topics
commandTopicBuilder- the command topic builder - a mechanism for configuring the simple sourcing command topics
Copyright © 2019. All rights reserved.