Akka Persistence Question

Hi!

I’m a student and trying to finish the project but I got one problem.
I’ve got a question concerning Persistence in Akka. The problem is that the code in the documentation (Persistence • Akka Documentation) - the first listing under the “Event sourcing” - doesn’t work. We need the persistence to implement “at least once delivery”, where we store the state but unfortunately, we can’t run even the code in the docs. Can you help us with:

  1. are you able to run the code in docs;
  2. if you are can you describe the steps we need to do.

Thank you in advance for your help

1 Like

A good starting point is the tutorial in the Akka Platform Guide. From there you can download runnable samples with instructions. Section 4 covers Event Sourced actors.

When you have that setup you should be able to modify and adjust according to the reference documentation.

2 Likes

Thank you for the answer!

But maybe my question was a little bit misleading. Actually, I need to have a stateful Actor with Akka Classic Persistence which means that I need to use exactly classic persistence with AbstractPersistentActor and so on, and not Event Sourcing with Akka 2.6, I have mentioned “Event Sourcing” due to just a chapter in the documentation for classic persistence 2.5 Akka version. As I’ve understood from the documentation, it is possible; though their code doesn’t work, which means that I’m probably misconfiguring something.

Can you guide me, maybe there are any tutorials here that I’ve just not found, or I shouldn’t work with Akka Classic Persistence in this case and there is some more elegant way to create a stateful actor.

I hope I didn’t misunderstand any concepts