I have some questions regarding the exact semantic of
Use PersistentEntity as a kind of persistent FSM (i.e. one FSM per AggregateRoot)
PersistentEntity State is the FSM State which is also reflected in the emitted Events. Then, a
ReadSideHandler is responsible for doing FSM transition which includes performing async operation (calling another service) and computing next state which is then sent back as a Command to the
Now, my first point is ensuring that the
handle() Flow in
ReadSideHandler has an exactly-once semantic, as otherwise it would break my pseudo-FSM semantic. I guess it is the case but this seems to not be specified in the doc, so I would like to find a confirmation of this.
My second question concerns parallelization of ReadSide event processing. As the processing of my Event includes asynchronous operations, I would like to parallelize it among the AggregateRoot’s.
As far as I understand the only way to process events in a parrallel way is to rely on
AggregateEventTag and to define the number of Tag according to the desired level of parallelism. Here I wonder whether I can define any number of
AggregateEventTag without bothering, or whether this may have unintended effects on other aspects. To put it differently, are these
AggregateEventTag used only for ReadSide processing or are they also used somewhere else ?
Last but not least, does the use-case presented above seem suitable, and do you see any potential problem or drawback that may occur with this approach?
Thanks in advance for any response!