We're currently using SignalR 2.2 hubs and sending everything to everyone all the time (Clients.All). We now have a need to send some messages to a subset of clients, based on the user claim for that connection, but we're using the Redis scale-out backend. The users have claims for interests, like "/cars/honda" or a global one like "/cars/all". Any given message will have a mixture of things inside them like cars, animals, news, etc., in the same message.

The only thing I can think of that we can do to "filter" the messages is to have the client subscribe to groups based on the claims and, when a message is going out, send the message to all the associated groups as well as a global group for the "/all" subscriptions. However this sounds like it would create a lot of extra/duplicate messages, is that correct? Is there another way?

Related posts

Recent Viewed