Stopping actors

Typed actors can be stopped via calling the Stop or PoisonPill method on the TypedActor extension and passing the reference of the dynamic proxy instance.

Java:

//To shut down the typed actor, call the stop method on the //TypedActor extension and providing the proxy instance
TypedActor.get(system).stop(calculator);

//Other way to stop the actor is invoke the Poisonpill method //on the TypedActor extension and passing the proxy instance
TypedActor.get(system).poisonPill(calculator);

Scala:

//To shut down the typed actor, call the stop method on the //TypedActor extension and providing the proxy instance
TypedActor(system).stop(calculator) //Other way to stop the actor is invoke the Poisonpill method //on the TypedActor extension ...

Get Akka Essentials now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.