0

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!

4

1 回答 1

1

如果 Akka.system 是“my-system”演员系统,那么您应该能够跳过“akka://my-system”部分并直接进入“/user/my-actor”。

如果 Akka.system 是另一个 Actor 系统,那么您可以使用远程处理并指定另一个系统的完整地址,例如“akka.tcp://my-system@my-host:my-port/user/my-actor ”。

于 2013-11-06T20:59:17.860 回答