September 2023
Intermediate to advanced
470 pages
11h 12m
English
It’s now time to put the event streamer to work inside the command handler. In our event store implementation, we split the responsibilities in this way:
EventStreamer knows the events—clearly—it knows the database (or the in-memory list), and it knows how to search for data in it, but it doesn’t know the domain entity.
EventStore knows how to convert events into entities and how to use the event streamer. It doesn’t know about the actual persistence and can work with both streamers, and it doesn’t know about commands.
CommandHandler manages the logical transactions; it knows how to use event store, but it doesn’t know anything about the streamer.
Let’s visualize it:
To work with a context, CommandHandler ...
Read now
Unlock full access