Open chbatey opened 4 years ago
This sounds really useful - and would help address the usual concerns that people have around eventual consistency (in addition to some form of Telemetry metrics for an aggregated view of propagation time).
This is a use case that's specific for projections over akka persistence journals. Should we include it as part of akka-projections
?
(off-topic, brain dump) It'll require changing the akka persistence api and plugins (in either the two alternatives @chbatey suggests). (/off-topic, brain dump)
Maybe, a solution would be to guide the user into registering a StatusObserver
and implement the progress
method so they're notified of each envelope that's been successfully processed by the projection.
When a command comes into a system it is convenient to be able to return to the user once that event has been propagated to projections.
This could be implemented via a correlation id published from the projection or via each projection publishing its offset to pub sub or data that can be used to check that the projection has passed the offset of the event. We'd need to expose the offset of an event on the persistent actor side for the second option.
First step could be to document how a user would do this without support from projections via a correlation id.
This was originally brought up by @mckeeh3 - Hugh, did I miss anything?