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");
ActorSelection router_selection =
test_system.actorSelection("akka.tcp://[email protected]:2553/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
[INFO] [07/11/2014 12:35:43.507] [main] [Remoting] Remoting started;
listening on addresses :[akka.tcp://[email protected]:2553]
[INFO] [07/11/2014 12:35:43.508] [main] [Remoting] Remoting now listens on
addresses: [akka.tcp://[email protected]:2553]
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://[email protected]: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 {
nodes = ["akka.tcp://[email protected]:2552"]
}
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
}
}
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.