Skip to content

Instantly share code, notes, and snippets.

@LukasGasior1
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LukasGasior1/b6e3c56a6660f92c4681 to your computer and use it in GitHub Desktop.
Save LukasGasior1/b6e3c56a6660f92c4681 to your computer and use it in GitHub Desktop.
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