When persisting list of events, can I be sure that all events will be handled in preserved order?
This topic is based on a conversation between an anonymous user of Akka and our “Ask AI about Akka” bot in the documentation.
When persisting list of events, can I be sure that all events will be handled in preserved order?
This topic is based on a conversation between an anonymous user of Akka and our “Ask AI about Akka” bot in the documentation.
Events persisted in a batch are persisted in the order they are passed into the Effect.persist(events)
. While persisting, the immutable data structure used under the hood is responsible to maintain order and to assign each event a unique increasing index used for ordering when they are read.
This is a corrected answer to the reply of the “Ask AI about Akka” bot in the documentation. Originally the bot explained the overall order of individual persisted events.