Created
January 27, 2016 19:18
-
-
Save hussachai/c60d93ee20b690675c2c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SubscribeActor(redis: RedisClient, out: ActorRef, | |
channels: Seq[String] = Nil, patterns: Seq[String] = Nil) extends RedisSubscriberActor( | |
new InetSocketAddress(redis.host, redis.port), channels, patterns, | |
onConnectStatus = connected => { println(s"connected: $connected") }) { | |
def onMessage(message: Message) { | |
out ! message.data.decodeString("UTF-8") | |
} | |
def onPMessage(pmessage: PMessage) {} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment