Created
September 18, 2016 18:54
-
-
Save akgupta/6970efbbd68f32d7bb86c3a3992080df to your computer and use it in GitHub Desktop.
Send a message to the Actor managing an EventSource connection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// User B sends a message to User A | |
// We identify the Actor which manages the connection on which User A is connected (connectionIdA) | |
ActorSelection actorSelection = Akka.system().actorSelection("akka://application/user/" + connectionIdA); | |
// Send B's message to A's Actor | |
actorSelection.tell(new ClientMessage(data), ActorRef.noSender()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment