Akka.Aspire.Hosting
1.5.70
Prefix Reserved
dotnet add package Akka.Aspire.Hosting --version 1.5.70
NuGet\Install-Package Akka.Aspire.Hosting -Version 1.5.70
<PackageReference Include="Akka.Aspire.Hosting" Version="1.5.70" />
<PackageVersion Include="Akka.Aspire.Hosting" Version="1.5.70" />
<PackageReference Include="Akka.Aspire.Hosting" />
paket add Akka.Aspire.Hosting --version 1.5.70
#r "nuget: Akka.Aspire.Hosting, 1.5.70"
#:package Akka.Aspire.Hosting@1.5.70
#addin nuget:?package=Akka.Aspire.Hosting&version=1.5.70
#tool nuget:?package=Akka.Aspire.Hosting&version=1.5.70
Akka.Aspire.Hosting
.NET Aspire hosting integration for Akka.NET clusters. Add it to your Aspire AppHost to declare a
cluster's topology — discovery backend, replica count, ports — and every service replica wired with
WithReference will automatically discover its peers, form a cluster, and report health.
Pair it with the service-side Akka.Aspire package,
which reads the configuration this package injects.
Installation
dotnet add package Akka.Aspire.Hosting
Usage (AppHost)
using Akka.Aspire.Hosting;
var builder = DistributedApplication.CreateBuilder(args);
// A discovery-backend Aspire resource (Redis here; Azure Table Storage is also supported)
var redis = builder.AddRedis("akka-discovery");
// Declare the Akka.NET cluster and bind its discovery backend
var akka = builder.AddAkka("my-cluster")
.WithClustering(redis);
// Wire the cluster into a replicated service
builder.AddProject<Projects.MyService>("service")
.WithHttpEndpoint(name: "http")
.WithReplicas(3)
.WithReference(akka);
builder.Build().Run();
AddAkka declares the cluster; WithClustering(resource) binds the discovery backend (the provider
type is auto-detected from the resource — e.g. Redis, AzureTableStorage); and WithReference(akka)
injects the resulting configuration into each service replica.
What it injects
WithReference(akka) sets these environment variables on each replica, which the service-side
Akka.Aspire package reads via IConfiguration:
| Variable | Purpose |
|---|---|
Akka__Cluster__Enabled |
Enables clustering |
Akka__Cluster__RemotePort / Akka__Cluster__ManagementPort |
Unique ports per replica |
Akka__Cluster__PublicHostName / Akka__Cluster__ServiceName |
Discovery identity |
Akka__Cluster__RequiredContactPointsNr |
Derived from the replica count |
Akka__Cluster__Clustering__ProviderType |
Auto-detected from the resource type |
Akka__Cluster__Clustering__ConnectionStringName |
The Aspire resource name for the discovery backend |
ConnectionStrings__<name> |
The connection string for that backend |
Supported discovery backends
- Redis —
builder.AddRedis(...)+ service-sideAkka.Discovery.Redis - Azure Table Storage —
builder.AddAzureStorage(...).AddTables(...)+Akka.Discovery.Azure - Kubernetes — service-side
Akka.Discovery.KubernetesApi(no connection string needed)
Complete Redis and Azure Table Storage samples live under src/aspire/examples/ in the
Akka.Management repository.
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
- Aspire.Hosting.AppHost (>= 13.3.5)
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 | 136 | 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))