akka-meta
akka-meta copied to clipboard
Event sourcing for Akka Streams
I just published a proposal how to add event sourcing to Akka Streams. It proposes an EventSourcing
graph stage that, when joined with an event log, is a stream-based equivalent to a PersistentActor
but with type-safety and back-pressure for the whole event sourcing message flow. The proposal also implements a stream API on top of Akka Persistence journals and Apache Kafka to define a public interface for event logs.
Please note that this proposal is not a complete specification but rather illustrates some initial ideas and verifies them with a prototype implementation. In its current state, it should mainly serve as a basis to discuss the general approach (rather than implementation details). The proposal might become a later contribution if there is enough interest.
The proposal is now extended for supporting behavior changes for request and event handlers. The approach is comparable with that of typed actors except that handler results are returned in addition to new behavior.