Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

237
Vistas
How to listen to messages which are sent to ActorSystem (Akka 2.0)

I have a code, where I create an Actor from AkkaSystem.

return system.actorOf(Props.apply(new Creator<Actor>()
....

Inside the child actor I call

context().parent().tell(new DeathByError());
context().stop(self());

is there a way to know from the parent (ActorSystem object) to know that child sent DeathByError message ?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

When you are handling the message you can call getSender() which should return the ActorRef of the one who sent the message.

over 4 years ago · Santiago Trujillo Denunciar

0

If you meant "what" child sent the message, Micheal Rose's answer is correct.

If you simply want to receive it, add a handler for it in the parents receive method.

Note that if you "watch" an actor from another actor, the latter is notified when the former dies, without need for you to explicitly sending a message ( http://doc.akka.io/docs/akka/current/scala/actors.html#Actor_Lifecycle )

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda