Open aateeque opened 4 years ago
We have await Clients.Groups(group1, group2, etc...).SendAsync(...);
already.
https://source.dot.net/#Microsoft.AspNetCore.SignalR.Core/IHubClients%2560T.cs,d37e9b653646baf5
I meant more like send to Client if Client is in group1 AND group2; from the doc on that method it's for all clients in all groups given.
Maybe useful to expose
HubGroupList
to allow richer linq statements
That only works when you have a single server though. As soon as you have Azure SignalR or Redis in place, there is no one list of group members.
It would be really useful to have an
And
like operator on groups where you can send a message to clients in a number of groups: user intersection in groups.
We never had this in ASP.NET SignalR (that I'm aware of). Generally the pattern we recommended was for you to create intersection groups yourself if you need them. Adding new "addresses" like this is quite costly since it requires updates and support across scale-out systems (Redis and Azure SignalR).
In particularly, this one is challenging because we implement groups using Redis channels and there's no way to do intersection there. We'd have to implement intersection on each server, which is costly.
Given the history here, I don't think this is a high priority for us, at least not without more customer feedback.
It would be really useful to have an
And
like operator on groups where you can send a message to clients in a number of groups: user intersection in groups. Maybe useful to exposeHubGroupList
to allow richer linq statements