A small question: does it feel right implementing sagas that may take days by scheduling persistent actors? I.e. a persistent actor is scheduled to be awaken at some time by a certain message. Does this scheduled message survive system restart?
@object no, it won't. Scheduling works great for small intervals of time (subseconds to minutes, maybe hours)
for long periods, you could use quartz for akka
@Horusiath hmm, quartz. Never heard of it, will have to check out.
yes, it has pretty simple implementation if I remember correctly
Looks like that, thanks again!
Looks like I am not correctly configuring SqlServer plugin for persistence queries. I am getting "Unable to create read journal plugin instance type Akka.Persistence.SqlServer.Journal.SqlServerJournal".
I am executing the following statement: PersistenceQuery.Get(system).ReadJournalFor<SqlReadJournal>("akka.persistence.journal.sql-server")
The SqlServer Akka plugin works fine for persistent actors and configured with plugin id "sql-server".
Isn't this sufficient for use in persistent queries?
OK, I managed to get rid of an exception by using plugin id "akka.persistence.query.journal.sql", but is this right? I am actually using an SQL Server plugin.
Eventually managed to get persistent queries with SQL Server plugin (yes, I had to use "akka.persistence.query.journal.sql" as plugin id). First experience is strange: it takes almost forever to execute AllPersistentIds for the first time - and I only have 300+ records in EventJournal. I have old custom code that does this quickly without using persistent queries, I was about to replace it with standard implementation but first I have to figure out why it is grotesquely slow. It returns within a few seconds only if I limit the number of results with Take(small_number), otherwise it takes minutes.
@object the reason for SQL read journal config is that there is only one, used by all SQL plugins (which are compatible with akka.persistence.query at least) - so you don't need to specify versions directed to different SQL databases
also for the case of AllPersistentIds - could you setup an issue?
Is there an example project that uses the Cluster Sharding module? I'm having a bit of trouble envisioning how to use it.
@Horusiath yes, I will try to extract a small example and check if it's still so slow. Then I will create an issue.
@wdspider yep, inside the main repo
btw. guys, I want to finish my CQRS/Eventsourcing akka sample - but it looks like I'm a very unimaginative person. I need some kind of simple event stormed scenario to program, something that could be used for learning purposes. Do you know anything about such scenarios?
Hello please what is the best practice in using await inside a Receive of an Actor?