These are chat archives for petabridge/akka-bootcamp

17th
Mar 2017
bjxu
@bjxu
Mar 17 2017 17:05
Hi, does any one have a trick to use Scheduler.ScheduleTellRepeatedly but tell a different message instead of the same message each time? e.g. in the message there is a timestamp DateTime.Now...
mwardm
@mwardm
Mar 17 2017 17:10
Create an actor whose purpose is to receive the schedule message, create a new message with a DateTime.Now in it, and forward that?
bjxu
@bjxu
Mar 17 2017 17:25
that will work.
thanks
mwardm
@mwardm
Mar 17 2017 17:26
np
bjxu
@bjxu
Mar 17 2017 17:29
Will the internal property or state be lost after I restart the actor? Do I have to use Akka persistence to retreive the state after I restart?
mwardm
@mwardm
Mar 17 2017 17:44
Restarting actors will cause internal state to be lost.
If you're restarting the whole process
then you'll be losing any scheduler info as well.
If you're not restarting the whole process, then there's no need to shutdown / restart the other actor - just leave it running.
bjxu
@bjxu
Mar 17 2017 17:51
yes, I don't intend to restart my actor, just in case some bad exception was thrown