Skip to content

Instantly share code, notes, and snippets.

@adamw
Created June 10, 2018 18:23
Show Gist options
  • Save adamw/55c0b44acea49cb7a4a08becc6db976d to your computer and use it in GitHub Desktop.
Save adamw/55c0b44acea49cb7a4a08becc6db976d to your computer and use it in GitHub Desktop.
def broadcastBehavior(
connector: QueueConnector[Future]): Behavior[BroadcastActorMessage] =
Behaviors.setup { ctx =>
val connectBehavior = Behaviors
.supervise[Nothing](connectToQueueBehavior(connector, ctx.self))
.onFailure[RuntimeException](SupervisorStrategy.restart)
ctx.spawn[Nothing](connectBehavior, "connect-queue")
def handleMessage(
consumers: Set[ActorRef[String]]): Behavior[BroadcastActorMessage] = // ...
handleMessage(Set())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment