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
?
相关问题
- Unusual use of the new keyword
- Netty websocket client does not read new frames fr
- Get Runtime Type picked by implicit evidence
- What's the point of nonfinal singleton objects
- PlayFramework: how to transform each element of a
From my experiments,
Concurrent.broadcast
does not send to everyone (some unfortunate naming perhaps?) Here is what I used that works as expected.Short answer
Maintain separate channel for each user and have groups associated with users
Long answer
This filter has to be applied as,
Short Answer
Long answer