He-Pin opened a new pull request, #3438: URL: https://github.com/apache/pekko/pull/3438
### Motivation Writing events one at a time to the journal is inefficient when many actors are persisting concurrently. A shared event writer that batches writes per persistence id and handles duplicate detection improves throughput for write-heavy workloads. ### Modification - Add `EventWriter` internal actor that batches journal writes per persistence id, handles duplicate detection via highest sequence number lookup, and supports partial batch rewrites. - Add `EventWriterExtension` for per-journal writer instances. - Add `event-writer` config (`max-batch-size`, `ask-timeout`) to persistence-typed `reference.conf`. - Add `delay-writes` config to `InmemJournal` for testing write timing behavior. - Add comprehensive `EventWriterSpec` covering duplicates, batching, partial duplicates, error propagation, and multi-pid writes. ### Result Internal API available for batching journal writes with duplicate handling. InmemJournal supports configurable write delays for testing. ### Tests - `sbt "persistence-typed-tests / Test / testOnly org.apache.pekko.persistence.typed.internal.EventWriterSpec"` ### References Refs akka/akka-core#32010 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
