Skip to content

Instantly share code, notes, and snippets.

@dan-palmer
Last active December 10, 2015 11:49
Show Gist options
  • Save dan-palmer/4430098 to your computer and use it in GitHub Desktop.
Save dan-palmer/4430098 to your computer and use it in GitHub Desktop.
hello world akka example
object TestAkka extends App {
import akka.actor._
class TestActor extends Actor {
def receive = {
case "hello" => println("hello world")
case _ => println("something else")
}
}
val system = ActorSystem("TestSystem")
val testActor = system.actorOf(Props[TestActor], name="testactor")
testActor ! "hello"
testActor ! "arghh"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment