Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SignalR
Overview
This package bundles the SignalR hubs, interfaces and extension points that Eltheon uses for real-time communication between the host, admin UI and plugins. It defines opinionated hubs for Admin, Public and User channels and provides an extension model so features can contribute hub endpoints without rewriting boilerplate.
Contents
AdminHub,UserHub,PublicHubinherit from base hub classes that acceptISignalRExtensioninstances, allowing features to register hub methods in a modular way.- Interfaces such as
ISignalRExtension,IAdminHub,IUserHubdescribe the contract for injecting new hub functionality or broadcasting strongly-typed payloads. - Factories and middleware simplify hub registration with the ASP.NET Core pipeline.
Usage
builder.Services.AddSignalR();
builder.Services.AddSingleton<ISignalRExtension, DashboardSignalRExtension>();
builder.Services.AddSignalREventBridge(options =>
{
options.BroadcastAllEvents = true; // send all events to AdminHub->EventBusEvent
options.Routes.Add(new SignalREventRoute
{
EventName = "Notification.Created",
Hub = SignalRHubTarget.User,
Method = "NotificationEvent",
Scope = SignalRClientScope.User,
Target = "{user-id}" // replace with actual user identifier when routing users
});
});
In your host, map the included hubs:
app.MapHub<AdminHub>("/hub/admin");
app.MapHub<UserHub>("/hub/user");
app.MapHub<PublicHub>("/hub/public");
Extensions implementing ISignalRExtension can inject hub methods by overriding the base hub’s Register pattern, enabling features such as the Service dashboard to push updates without referencing the host project.
EventBus Bridge
SignalREventProviderimplementsIEventProviderand broadcasts matched events to the configured hub/method.- Configure via
AddSignalREventBridge(above); setRoutesfor specific EventNames orBroadcastAllEventsto stream everything toDefaultRoute(AdminHub, methodEventBusEvent, All). ScopesupportsAll,Group, orUser; forGroup/UsertheTargetvalue is required.
Diagnostics
Because hubs are regular SignalR hubs, standard logging applies. Enable Microsoft.AspNetCore.SignalR plus Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.SignalR to monitor connection lifecycle, group membership and broadcast outcomes. When combined with the Service or AdminDashboard features, these hubs become the transport for operational telemetry.