Search code examples
signalrasp.net-core-signalrsignalr-backplane

SignalR backplane expected behavior


I'm creating a new SignalR (.net core) backplane and I'm a little confused about the backplane's expected behavior.

  • Send all: Is this restricted to all within a hub type or to all hubs of any type across the entire network?
  • Send to Group: Simalar question. Should I only be sending to groups within a hub type? Or should I send a group message to all subscribers of a group by name - regardless of the source or destination hub type?
  • Send to User: Also similar question. Should I send the message to all instances of the user, regardles of hub type? Or should I restrict sending to only same user instances of the source hub type?

Solution

  • I think I found the answer to my question in the source for the Microsoft.AspNetCore.SignalR.StackExchangeRedis backplane.

    It seems all message channels are prefixed with the type.FullName of the hub. So send-all, send-to-group, and send-to-user messages are always scoped to the Hub type doing the sending.

    So all mesages are always (and only) received by hubs of the same type. And no messages sent from other hub types should ever be received by said hub!

    Please correct me if I'm wrong about this. Having the wrong paradigm will reak havoc on my backplane. Which I hope to make public as soon as it's done.