From 6d20a17d7a2edf2366a289e7c60fc3897917dcd2 Mon Sep 17 00:00:00 2001 From: Adrian Leonhard Date: Sat, 19 Mar 2022 11:25:53 +0100 Subject: [PATCH] Update PersistAsync to match docs. This is supposed to be the example for persistAsync, but it doesn't get used at all. https://getakka.net/articles/persistence/event-sourcing.html#relaxed-local-consistency-requirements-and-high-throughput-use-cases I changed the code to match what is here: https://doc.akka.io/docs/akka/current/persistence.html#relaxed-local-consistency-requirements-and-high-throughput-use-cases --- .../Persistence/PersistentActor/PersistAsync.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/Akka.Docs.Tests/Persistence/PersistentActor/PersistAsync.cs b/src/core/Akka.Docs.Tests/Persistence/PersistentActor/PersistAsync.cs index df5d6340ba6..9654dc43525 100644 --- a/src/core/Akka.Docs.Tests/Persistence/PersistentActor/PersistAsync.cs +++ b/src/core/Akka.Docs.Tests/Persistence/PersistentActor/PersistAsync.cs @@ -27,9 +27,8 @@ protected override void OnCommand(object message) if (message is string c) { Sender.Tell(c); - Persist($"evt-{c}-1", e => Sender.Tell(e)); - Persist($"evt-{c}-2", e => Sender.Tell(e)); - DeferAsync($"evt-{c}-3", e => Sender.Tell(e)); + PersistAsync($"evt-{c}-1", e => Sender.Tell(e)); + PersistAsync($"evt-{c}-2", e => Sender.Tell(e)); } } }