May 2017
Intermediate to advanced
414 pages
13h
English
Add the following required imports to the top of the file:
import java.util.concurrent.ConcurrentLinkedQueue import akka.actor.{Props, Actor, ActorSystem,ActorRef} import akka.dispatch.{ MailboxType, ProducesMessageQueue, Envelope, MessageQueue} import com.typesafe.config.Config
class MyMessageQueue extends MessageQueue { private final val queue = new ConcurrentLinkedQueue[Envelope]() // these should be implemented; queue used as example def enqueue(receiver: ActorRef, handle: Envelope): Unit = { if(handle.sender.path.name == "MyActor") { handle.sender ...Read now
Unlock full access