Hi Martin,

I am not using channels, just processors and persistent messages. Here is 
the code

object Main extends App {

val config = ConfigFactory.load().getConfig("evsourd")
implicit lazy val system = ActorSystem("evsourd", config)

val top = system.actorOf(Props[TopActor], name = "top")


for(i <- 1 to 10)
top ! i

}

class TopActor extends Actor with ActorLogging {

var workers = Map.empty[Int, ActorRef]

override def receive = {

case n: Int =>
if(!workers.contains(n % 4))
workers += (n % 4 -> context.actorOf(Props[Worker], name = "worker" + (n % 
4)))

    workers(n % 4) ! Persistent(n)

}

}

class Worker extends Processor with ActorLogging {

override def processorId = self.path.name


override def receive = {

case Persistent(payload: Int, sequenceNr) =>
if(recoveryRunning)
log.debug("recovery message " + payload)
else
log.debug("new message " + payload)



}

}

Thanks
Vadim

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: http://akka.io/faq/
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to