SignalR.Backplane.EFCore 1.1.0

dotnet add package SignalR.Backplane.EFCore --version 1.1.0
                    
NuGet\Install-Package SignalR.Backplane.EFCore -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SignalR.Backplane.EFCore" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SignalR.Backplane.EFCore" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="SignalR.Backplane.EFCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SignalR.Backplane.EFCore --version 1.1.0
                    
#r "nuget: SignalR.Backplane.EFCore, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SignalR.Backplane.EFCore@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SignalR.Backplane.EFCore&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=SignalR.Backplane.EFCore&version=1.1.0
                    
Install as a Cake Tool

SignalR.Backplane.EFCore

An EF Core–backed backplane for ASP.NET Core SignalR.
Enables horizontal scale-out across multiple application instances with:

  • Ack-based delivery
  • Subscriber heartbeat tracking
  • Configurable cleanup policies

🚀 Installation

dotnet add package SignalR.Backplane.EFCore

⚡ Quick Start

1. Register services in Program.cs

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddSignalR()
    .AddBackplaneDbContext<EfBackplaneDbContext>(
        options => options.UseSqlite(builder.Configuration.GetConnectionString("Main")),
        configure =>
        {
            configure.StoreSubscriberId = $"{Environment.MachineName}-{Guid.NewGuid()}";
            configure.AutoCreate = true;
        });

builder.Services.AddOpenApi();

var app = builder.Build();

if (app.Environment.IsDevelopment())
{
    app.MapOpenApi();
}

app.UseHttpsRedirection();

app.MapHub<NotificationHub>("/hubs/notification");

app.MapGet("/randomMessage", async (IHubContext<NotificationHub> hubContext) =>
{
    var msg = $"Random-{Guid.NewGuid():N}";
    await hubContext.Clients.All.SendAsync("signalr", msg);
    return Results.Ok(new { Sent = msg });
});

app.Run();

👉 Run multiple instances of your app pointing at the same database to scale SignalR out across nodes.
Each instance must use a unique SubscriberId.


🧭 Scale-Out Notes

  • Use any EF Core provider as the shared store (Postgres, SQL Server, SQLite for dev/test).
  • Ensure each app instance sets a unique StoreSubscriberId (e.g., hostname + GUID).
  • If two stores use the same StoreSubscriberId, they are treated as instances of the same subscriber — acknowledgements from one apply to all (idempotent).
  • AutoCreate = true simplifies the first run, but in production run migrations explicitly.
  • Works seamlessly in containers, Kubernetes, Azure App Service, or VMs — no Redis required.

▶️ Running two instances locally (Kestrel)

Both servers share the same SQLite file for testing:

# Terminal 1
dotnet run --urls "https://localhost:5001"

# Terminal 2
dotnet run --urls "https://localhost:5002"

For production, use Postgres or SQL Server as the shared store.


▶️ Connect a .NET client

using Microsoft.AspNetCore.SignalR.Client;

var connection = new HubConnectionBuilder()
    .WithUrl("https://localhost:5002/hubs/notification") // match your server URL
    .WithAutomaticReconnect()
    .Build();

connection.On<string>("signalr", msg =>
{
    Console.WriteLine($"[NotificationHub] Received: {msg}");
});

await connection.StartAsync();
Console.WriteLine($"State: {connection.State}"); // should be Connected

Console.WriteLine("Connected to SignalR NotificationHub.");
Console.ReadKey();

await connection.DisposeAsync();

✅ You’ll see the message arrive regardless of which instance you send it to.


✨ Features

  • Horizontal scalability — run multiple SignalR instances against a shared DB
  • EF Core backplane — supports Postgres, SQL Server, and SQLite
  • Ack-based message delivery — ensures subscribers confirm receipt
  • Subscriber heartbeat tracking
  • Configurable cleanup — TTL, logical delete, or physical delete
  • Multiple hub support — via generic BusHubLifetimeManager<THub>


📜 License

MIT License © Bill Nice G. Havugukuri

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 145 9/15/2025