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.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store