Hi everyone,
I set up a little testing environment to debug another problem with remoting, but I'm stuck on an issue (?) with actorselection: telling a message to a remotely created router works, telling the message to an actorselectopn of that router, routes the message to deadletters.
Akka version: 2.3.3
(At the end of the mail, the application.conf)
My test code:
public class Main {
public static void main(String[] args) throws InterruptedException {
ActorSystem test_system = akka.actor.ActorSystem.create("PingActorSystem");
test_system.eventStream().subscribe(test_system.actorOf(Props.create(EventWatcher.class)),Object.class);
ActorRef router = test_system.actorOf(Props.create(LocalRouter.class).withRouter(new FromConfig()),"LocalRouter");
Thread.sleep(1000);
System.err.println(String.format("Selection ActorPath: %s AnchorPath: %s",router_selection.pathString(),router_selection.anchorPath()));
router.tell(new Integer(1234),ActorRef.noSender());
router_selection.tell("PING!?!?",ActorRef.noSender());
}
}
The Output:
[INFO] [07/11/2014 12:35:43.352] [main] [Remoting] Starting remoting
Received: akka.remote.AssociatedEvent
Selection ActorPath: /LocalRouter AnchorPath: akka://PingActorSystem/
Received: akka.actor.DeadLetter
java.lang.String
Received: akka.event.Logging$Info
[INFO] [07/11/2014 12:35:44.540] [PingActorSystem-akka.actor.default-dispatcher-4] [akka://PingActorSystem/LocalRouter] Message [java.lang.String] from Actor[akka://PingActorSystem/deadLetters] to Actor[akka://PingActorSystem/LocalRouter] was not delivered. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
The remote routees are successfully created and are not dead. I have no log at all on the worker/routees console (PongActorSystem), except for the receive of the numeric message.
Then I tried to ActorSelect the router from a third machine, but I have the same behaviour: message are correctly sent to the remote router (PingActoSystem), but instead
of forwarding it to the remotely deployed routees ( target { nodes = ["akka.tcp://
PongAct...@192.168.2.17:2552"] } ) it routes the message to deadletters.
Does anyone have ever had a similar issue? How could I fix?
Thanks in advance
- Pierre
Configuration:
akka {
loglevel = "INFO"
stdout-loglevel = "INFO"
actor {
provider = "akka.remote.RemoteActorRefProvider"
serialize-creators = on
serialize-messages = on
serializers {
java = "akka.serialization.JavaSerializer"
proto = "akka.remote.serialization.ProtobufSerializer"
}
serialization-bindings {
"java.lang.String" = java
"com.google.protobuf.Message" = proto
}
deployment {
/LocalRouter {
target {
}
router = balancing-pool
nr-of-instances = 1
}
}
default-dispatcher {
throughput = 10
executor = "fork-join-executor"
}
}
remote {
enabled-transports = ["akka.remote.netty.tcp"]
hostname = "Vortex"
netty.tcp.port = 2553
}
}