These are chat archives for petabridge/akka-bootcamp

Mar 2017
Nick Chamberlain
Mar 22 2017 13:02
@IlyaKomendantov_twitter Yea I wonder the use case, because maybe there'd be a few ways to accomplish what you're describing. If you want collaborating actors to subscribe to the events, plus persist the events for later use (not recovery), you could have a persistent actor subscribe to the events along with the other subscribers. The persistent actor only calls persist when it receives a new event. I haven't tried this, but I wonder also if you could have your persistent actor be the publisher, publishing the event to subscribers once it has persisted the event. If you didn't want to use a persistent actor, you could just as well use an actor that talks to a db and inserts the event data as you see fit (i.e. without event metadata and stuff)
@bjxu maybe keep an internal collection of received messages and on every receive, call recievedMessageCollection.Add(message)? then your test would check the collection for what you're hoping to be there
Ilya Komendantov
Mar 22 2017 14:54
Thank you, guys! :)
Ilya Komendantov
Mar 22 2017 15:05
One more question: How to load PersistentActor with certain PersistentId? I know the id, I want to recover this one.. how to do that?
Ilya Komendantov
Mar 22 2017 16:22
ah, nevermind.. i figured this out )