Hi,
I have an Actor System and If I schedule a message for 1 hour then which actor will be sending the scheduled message after one hour.
Are we maintaining common scheduler for entire Actor System?
Is it running on daemon thread ?
Hi,
I have an Actor System and If I schedule a message for 1 hour then which actor will be sending the scheduled message after one hour.
Are we maintaining common scheduler for entire Actor System?
Is it running on daemon thread ?
The scheduler methods take an ExecutionContext
in addition to the task to schedule, where the scheduled task will run. For the methods that takes an ActorRef
and a message rather than a task the sender of the message will be deadLetters
.
You can find more details about it here: https://doc.akka.io/docs/akka/current/scheduler.html#classic-scheduler
Note that there are new APIs Timers
and AbstractActorWithTimers
for classic and the Behaviors.withTimers
for typed that abstract over the ActorSystem
scheduler with APIs that are nicer to use from an actor.