CQRS

EventSourcedBehaviors along with Persistence Query’s EventsByTag query can be used to implement Command Query Responsibility Segregation (CQRS).

The CQRS with Akka 2.6 video is a good starting point for learning how to use eventsByTag to implement CQRS with Akka. Also, watch the introduction to Event Sourcing with Akka 2.6 video.

The CQRS example projectCQRS example project shows how to do this, including scaling read side processors for building projections. In the sample the events are tagged to be consumed by even processors to build other representations from the events, or publish the events to other services.

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.