jorge07/symfony-6-es-cqrs-boilerplate

Command Handler: persisting data

marcopicasso opened this issue · 5 comments

How are data persisted in write database from command handler ?i'm a beginner with es-cqrs and it's difficult for me to understand this step!

The projectors are listening on events of the EventBus so when an event is published, it reacts to the events and store it in the write side.

It's better explained here

So, if i understand, the UserEmailReadProjectionFactory class is used to persist data on the db, right?

Right. It's a listener that will receive the events after they are persisted so you can do whatever you want with them.

Read class to Write data....it confuses me a little!

Ops Typo