Last active
August 29, 2015 14:22
-
-
Save LukasGasior1/b6e3c56a6660f92c4681 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
override val requestStrategy = new RequestStrategy { | |
override def requestDemand(remainingRequested: Int) = | |
Math.max(remainingRequested, 1) | |
} | |
override def receive = { | |
case OnNext(message: Message) => | |
val gameEvent = | |
GameEvent( | |
gameId = message.headers("gameId"), | |
eventType = message.headers("type"), | |
data = Json.parse(message.body.decodeString("UTF-8"))) | |
publisher ! gameEvent | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment