I have a play application where some actors are located in another ActorSystem. I'm trying to access the actors in that ActorSystem from the play application (basically I connect them to a REST API, i.e. send them messages when the play app gets a POST).
I'm creating this ActorSystem at start and I can confirm from the logs that it's indeed starting.
Let's assume the path of an actor in this separate system is akka://my-system/user/my-actor. How do I send a message to that actor?
I tried:
Akka.system.actorSelection("akka://my-system/user/my-actor") ! SomeMessage(...)
But this doesn't work. In the logs, I can see the following error (with deadLetters logging enabled):
Message ... from Actor[akka://application/deadLetters] to Actor[akka://application/deadLetters] was not delivered
Why doesn't it work?? And how can I get it to work?
Any help is much appreciated!