Skip to content

Instantly share code, notes, and snippets.

@hiramekun
Created September 11, 2020 01:37
Show Gist options
  • Save hiramekun/7bb58e939eed658ac89b3bbe8f312636 to your computer and use it in GitHub Desktop.
Save hiramekun/7bb58e939eed658ac89b3bbe8f312636 to your computer and use it in GitHub Desktop.
import akka.actor.{Actor, ActorSystem, Props}
object HelloWorld extends App {
val system = ActorSystem("system")
val ref = system.actorOf(Props[MyActor])
ref ! "HelloWorld"
}
class MyActor extends Actor {
override def receive: Receive = {
case msg => println(msg)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment