Broadcasting messages in Play Framework WebSockets
问题 I'm pushing messages in Play Framework WebSockets using Concurrent.unicast[JsValue] , and I want to optimize sending the same message to multiple users. Is it possible to broadcast message using somehow multiple Concurrent.Channel ? 回答1: Short answer Maintain separate channel for each user and have groups associated with users Long answer package controllers import akka.actor.Actor import play.api.libs.iteratee.Enumerator import play.api.libs.iteratee.Concurrent.Channel import play.api.libs