You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 18, 2018. It is now read-only.
In an application that is using SignalR and has Redis configured, is there a way we can customize the channel names used?
My situation is as follows:
ASP.NET Core app, hosted on Azure VMs, whose API uses SignalR to communicate with on-prem servers.
Our users may have separate installations (separate azure subscriptions, etc.) per customer.
However, they want to use a single server running Redis for all of these customers.
From what I can tell of the way SignalR uses redis pub/sub, this would lead to potential conflicts - while for two VMs of the same customer, we do want the SignalR channels to be shared, we don't want to receive messages from one customer in the other.
An example would be: imagine I am logged in on Customer A and Customer B's installations, with the same email, and a web page open on both. One of my hubs has a pubsub channel with the format "WebApi.Services.SignalR.NotificationHub:user:jose.maia@example.com". Upon doing an async API request for Customer A, whether it hits server A1 or A2, I should get my notification on web page A. However, if the channel has the same format on customer B's hubs, I will also get the notification on web page B, correct?
From looking at the code, I believe that RedisChannels's usage of a prefix would allow for this, if instead of the RedisHubLifetimeManager instancing RedisChannels just with the Hub's FullName, there was an option to allow a custom prefix (or... pre-prefix, I guess? :) ).
Is there a way to avoid this or, by design, each customer would require a separate Redis server?