ThreeDotsLabs / esja

Event Sourcing library in Go.
MIT License
19 stars 4 forks source link

Separate events loading from processing in SQL repository #23

Closed krzysztofreczek closed 1 year ago

krzysztofreczek commented 1 year ago

Why? Sometimes processing of events loaded from the database may be pretty complex (i.e. requiring another call to the database in order to retrieve the PII secret key). In order to allow conflict-free processing we need to load events from the database first and then process them. Also in order to allow processors to perform external calls and more advanced logic we need to pass a request context to the mappers.

Tests Existing tests were adjusted.