Open sebastian-alfers opened 2 years ago
To clarify, this issue is for adding API for hooking up an event adapter from Akka Persistence and automatically apply that. Specifically the request is about when a single event in the database is mapped to multiple events.
As far as I see it is currently possible in for example exactly-once by calling the adapter manually and making sure all the mapped events are committed in the same transaction. A specific API for plugging in the adapter would only provide a small convenience in my opinion.
Thanks @johanandren for your additional clarification.
Another aspect of this potential feature would be how to provide control over committing the event that was mapped to multiple events by the event adapter.
I think there is a high risk that the offset management will not work and that may result in "lost" events. Adding more features for "control over committing" seems overkill for such a niche feature. I think this should be handled in the application domain.
A single event exposed for a projection can be mapped in to multiple events that provide a single atomic commit for the "batch".