0
votes

I need to define several SignalR Hubs in my application, most of them will use a SQL Server Backplane, but one of them will use an Azure Service Bus.

Is it possible to have two different backplanes in the same application?

How do I specify a different configuration for a particular Hub?

All the samples that I've seen so far use GlobalHost.DependencyResolver.UseServiceBus to configure the backplane, but that will use the same backplane for all the hubs, not just the one.

1

1 Answers

0
votes

SignalR uses an implementation of IMessageBus in order to pass messages from client-to-client: an user sends a message to another one; this message will reach the server and it will pass through a MessageBus and then it will actually go through the socket and online to the other user.

By using a backplane, you tell SignalR to use a different implementation of the MessageBus that will send all the messages through that backplane (SQL, Azure Service Bus, Redis).

So the way I see it, if you configure the server to use a backplane, all messages through all hubs will pass through that MessageBus and to all servers.

So I'm not sure that you are able to filter messages by the hub they came from in order to send them to different backplanes.

I don't see how you can have multiple backplanes for the same server.

If you really need multiple backplanes, consider having two SignalR Servers with different configurations.

Hope this helps:)

Best of luck!