Skip to content

Instantly share code, notes, and snippets.

class DestinationSelector extends Actor with ActorLogging with ActorConfig {
def getPublishers(alias:String):List[String] = scala.collection.JavaConversions.asScalaBuffer(config.getStringList(s"rms.destinations.$alias")).toList
def receive = {
case message@RMSMessage(filename, _, alias, _) => {
val publishers = getPublishers(alias.toLowerCase)
publishers map (p => config.getString(s"rms.publishers.$p.type") match {
case "lsd" => {
rms {
destinations {
ncaa = [ "ncaa-int-main", "ncaa-int-1", "ncaa-int-2", "ncaa-int-3", "ncaa-int-4" ]
}
publishers {
ncaa-int-main {
type = "lsd"
host = "lsd-riak-int-web-1.sdc.vgtf.net"
domain = "ncaa"
@ianmcmahon
ianmcmahon / Master.scala
Created January 31, 2013 20:23
using scalaj.http.Http makes message sending break
import akka.actor.{ActorSystem, Props, Actor}
import scalaj.http.Http
case object Start
class Master extends Actor {
val worker = context.actorOf(Props[Worker], name = "worker")
def receive = {
case Start =>