AggregateEventStore

Read/write event store for one aggregate type.

Inheritors

Properties

Link copied to clipboard
abstract val aggregateType: String

Functions

Link copied to clipboard
abstract suspend fun append(preparedAppend: PreparedAppend<EVENT>): AppendResult<EVENT>

Appends preparedAppend. Resubmitting the same append is safe and produces the same committed event range. This exact retry is intended for ambiguous outcomes; preparing new events or handling the command again is a distinct attempt and does not have this guarantee.

Link copied to clipboard
abstract suspend fun readAggregateEvents(aggregateId: String, afterVersion: Long? = null, maxCount: Long? = null): AggregateEventReadResult<EVENT>

Reads committed events for aggregateId strictly after afterVersion, optionally limited by maxCount.