MessageActor.scala 319 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
package no.nsd.akkapres.router

import akka.actor.{ActorLogging, Actor}

case class Message(content: String)

class MessageActor extends Actor with ActorLogging {

  def receive = {

    case m: Message =>
      log.info(m.content)
      sender() ! m.content

    case _ =>
      log.info("Unable to handle it.")
  }

}