How do I use actorSelection to communicate with other actors?

Learn how to use actorOf to create actors and how to pass a URL to actorSelection to obtain the actor reference and send a message with Akka.

By Daniel Hinojosa
March 1, 2017
Screen from "How do I use actorSelection to communicate with other actors?" Screen from "How do I use actorSelection to communicate with other actors?" (source: O'Reilly)

Actors allow you to pass messages between processes. In this step-by-step training video Daniel Hinojosa takes you through the process of setting up two actors and opening a line of communication between them. Novice Akka developers will learn how to use actorOf to create actors and how to pass a URL to actorSelection to obtain the actor reference and send a message.

Access in-depth Scala training with our Scala Fundamentals Learning Path.

Learn faster. Dig deeper. See farther.

Join the O'Reilly online learning platform. Get a free trial today and find answers on the fly, or master something new and useful.

Learn more

Daniel Hinojosa is a programmer, consultant, instructor, speaker, and author with morethan 20 years of experience working with private, educational, and government institutions. Daniel loves JVM languages like Java, Groovy, and Scala, but also dabbles in Haskell, Ruby, Python, LISP, C and C++. With the goal of learning a new programming language every year, Daniel is eager to help other programmers work toward becoming polyglots themselves.

Post topics: Software Engineering
Share: