Regular SignalR
has ability to broadcast messages without filtering.
Clients.All.Send()
This would broadcast message to all clients connected to Hub
. Meanwhile, SignalR.Orleans
seems to provide only messages to specific group.
HubContext.Group(groupName).Send()
Question
Is there a way to broadcast SignalR message in Orleans without filtering and creating groups?
you can use IHubContext<THub>.Clients.All
and it would work fine.
The SignalR.Orleans
package implement its own HublifetimeManager
(github) and when you config SignalR to AddOrleans
it would replace the DefaultHublifetimeManager
(github) with its own implementation so any usage of IHubContext<THub>.Clients
or IHubContext<THub>.Groups
would use Orleans implementation of HublifetimeManager
.
So when you use IHubContext<THub>.Clients.All
it would use OrleansHubLifetimeManager<THub>
to send message and in detail it would broadcast your message to all silos with help of Orleans Streams
Just For More Info:
IHubContext<THub>.Clients.All
return an instance of AllClientProxy<THub>
which it's using HublifetimeManager.SendAllAsync
method to send messages