Akka MicrokernelΒΆ

Danger

The Akka Microkernel Archetype is deprecated in favor of the more general and better maintained Java Application Archetype.

An Akka microkernel application is similar to a Java Command Line application. Instead of running the classic mainClass, an Akka microkernel application instantiates and runs a subclass of Bootable . A minimal example could look like this

class HelloKernel extends Bootable {
  val system = ActorSystem("hellokernel")

  def startup = {
    // HelloActor and Start case object must of course be defined
    system.actorOf(Props[HelloActor]) ! Start
  }

  def shutdown = {
    system.terminate()
  }
}

The bash/bat script that starts up the Akka application is copied from the Akka distribution.

To use this archetype in your build, add the following to your build.sbt:

packageArchetype.akka_application

name := "A-package-friendly-name"

mainClass in Compile := Some("HelloKernel")

For more information take a look at the akka docs