Implementing the Event Store
Learn how to implement the event store by updating the modules, adding registries, and replacing repositories.
The AggregateRepository
interface sits on top of an AggregateStore
, which exists only as an interface.
Press + to interact
The AggregateStore
interface would be what finally makes the connection with the infrastructure on the other side. We will use this interface to create an event store that works with PostgreSQL.
Why have both AggregateRepository
and AggregateStore
?
It is reasonable to wonder at this point why both exist when it appears they both do the same thing. The repository has a few maintenance actions, such as building the aggregate by left folding over the events or marking new events committed ...