Akka.Aspire
1.5.70
Prefix Reserved
dotnet add package Akka.Aspire --version 1.5.70
NuGet\Install-Package Akka.Aspire -Version 1.5.70
<PackageReference Include="Akka.Aspire" Version="1.5.70" />
<PackageVersion Include="Akka.Aspire" Version="1.5.70" />
<PackageReference Include="Akka.Aspire" />
paket add Akka.Aspire --version 1.5.70
#r "nuget: Akka.Aspire, 1.5.70"
#:package Akka.Aspire@1.5.70
#addin nuget:?package=Akka.Aspire&version=1.5.70
#tool nuget:?package=Akka.Aspire&version=1.5.70
Akka.Aspire
.NET Aspire service (client) integration for Akka.NET clusters. Call WithAspireClusterBootstrap
in your service and it configures Akka.Remote, Akka.Cluster, Akka.Management, Cluster Bootstrap, and a
cluster-membership health check from the configuration that the
Akka.Aspire.Hosting AppHost package injects —
no manual HOCON required.
Installation
dotnet add package Akka.Aspire
Usage (service)
using Akka.Aspire;
using Akka.Discovery.Redis;
using Akka.Hosting;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddAkka("MySystem", (akkaBuilder, sp) =>
{
akkaBuilder.WithAspireClusterBootstrap(sp,
configureDiscovery: (b, config) =>
{
// The AppHost injects the discovery resource's name; fall back to a literal for clarity.
var connectionStringName = config["Akka:Cluster:Clustering:ConnectionStringName"] ?? "akka-discovery";
var redisConn = config.GetConnectionString(connectionStringName);
if (!string.IsNullOrEmpty(redisConn))
b.WithRedisDiscovery(redisConn, config["Akka:Cluster:ServiceName"]);
},
clusterConfigure: c => c.Roles = ["my-service"]);
});
builder.Services.AddHealthChecks();
var app = builder.Build();
app.MapHealthChecks("/healthz");
app.MapGet("/", () => "Hello from Akka.NET Aspire!");
app.Run();
WithAspireClusterBootstrap reads the Aspire-injected environment variables and stands up the full
cluster stack. The configureDiscovery callback wires the discovery plugin using the same
IConfiguration that Aspire populates, and clusterConfigure sets roles and other cluster options.
Swapping discovery providers
Only the AppHost resource and the configureDiscovery callback change between environments — the rest
of the service stays identical.
Azure Table Storage (local dev via Azurite, production via real Azure):
akkaBuilder.WithAspireClusterBootstrap(sp,
configureDiscovery: (b, config) =>
{
var name = config["Akka:Cluster:Clustering:ConnectionStringName"] ?? "akka-discovery";
var conn = config.GetConnectionString(name);
if (!string.IsNullOrEmpty(conn))
b.WithAzureDiscovery(conn, config["Akka:Cluster:ServiceName"]);
},
clusterConfigure: c => c.Roles = ["my-service"]);
Kubernetes (no connection string needed):
akkaBuilder.WithAspireClusterBootstrap(sp,
configureDiscovery: (b, config) => b.WithKubernetesDiscovery(),
clusterConfigure: c => c.Roles = ["my-service"]);
Health checks
WithAspireClusterBootstrap registers a cluster-membership health check tagged readiness, so a
/healthz/ready probe reports Healthy only once the node has joined the cluster (MemberStatus.Up):
app.MapHealthChecks("/healthz/ready",
new HealthCheckOptions { Predicate = c => c.Tags.Contains("readiness") });
Learn more
License
Apache-2.0
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Akka (>= 1.5.70)
- Akka.Cluster.Hosting (>= 1.5.68)
- Akka.Hosting (>= 1.5.68)
- Akka.Management (>= 1.5.70)
- Akka.Remote.Hosting (>= 1.5.68)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.2)
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.5.70 | 103 | 8/18/2026 |
* Update to [Akka.NET v1.5.70](https://github.com/akkadotnet/akka.net/releases/tag/1.5.70)
* Update to [Akka.Hosting v1.5.70](https://github.com/akkadotnet/Akka.Hosting/releases/tag/1.5.70)
* **New package: [`Akka.Discovery.Redis`](Akka.Discovery.Redis)** — Redis-based service discovery for Akka.Cluster.Bootstrap. Each node registers under a TTL key and refreshes it on a heartbeat; dead nodes expire automatically (no separate pruning process) and stale entries are filtered out of lookups. A lightweight alternative to `Akka.Discovery.Azure`, well suited to Redis-backed environments and .NET Aspire local development. ([#3444](https://github.com/akkadotnet/Akka.Management/pull/3444))
* **New: .NET Aspire integration** — [`Akka.Aspire.Hosting`](Akka.Aspire.Hosting) (AppHost side) and [`Akka.Aspire`](Akka.Aspire) (service side) bring automated Akka.NET cluster formation to [.NET Aspire](https://learn.microsoft.com/dotnet/aspire). Declare the discovery backend and replica count in your AppHost, and each service replica auto-discovers its peers, forms a cluster, and reports readiness through a health check — no manual HOCON. ([#3445](https://github.com/akkadotnet/Akka.Management/pull/3445))