This is a strange sequence diagram. Normally, an API would call a command handler, which in turn will use a repository to fetch one aggregate, make an operation, which in turn emits events, and these events are being saved to the store. Subscription to the store streams will then update a read model if necessary, asynchronously. The way you do it is very confusing and it seems some understanding of CQRS and event-sourcing is lacking there.

Alexey is the Event Sourcing and Domain-Driven Design enthusiast and promoter. He works as a Developer Advocate at Event Store and Chief Architect at ABAX.

Love podcasts or audiobooks? Learn on the go with our new app.