Aspire.Hosting.Kafka
13.4.6
Prefix Reserved
dotnet add package Aspire.Hosting.Kafka --version 13.4.6
NuGet\Install-Package Aspire.Hosting.Kafka -Version 13.4.6
<PackageReference Include="Aspire.Hosting.Kafka" Version="13.4.6" />
<PackageVersion Include="Aspire.Hosting.Kafka" Version="13.4.6" />Directory.Packages.props
<PackageReference Include="Aspire.Hosting.Kafka" />Project file
paket add Aspire.Hosting.Kafka --version 13.4.6
#r "nuget: Aspire.Hosting.Kafka, 13.4.6"
#:package Aspire.Hosting.Kafka@13.4.6
#addin nuget:?package=Aspire.Hosting.Kafka&version=13.4.6Install as a Cake Addin
#tool nuget:?package=Aspire.Hosting.Kafka&version=13.4.6Install as a Cake Tool
Aspire.Hosting.Kafka library
Provides extension methods and resource definitions for an Aspire AppHost to configure a Kafka resource.
Getting started
Install the package
In your AppHost project, install the Aspire Kafka Hosting library with NuGet:
dotnet add package Aspire.Hosting.Kafka
Usage example
Then, in the AppHost.cs file of AppHost, add a Kafka resource and consume the connection using the following methods:
var kafka = builder.AddKafka("messaging");
var myService = builder.AddProject<Projects.MyService>()
.WithReference(kafka);
Connection Properties
When you reference a Kafka resource using WithReference, the following connection properties are made available to the consuming project:
Kafka server
The Kafka server resource exposes the following connection properties:
| Property Name | Description |
|---|---|
Host |
The host-facing Kafka listener hostname or IP address |
Port |
The host-facing Kafka listener port |
Aspire exposes each property as an environment variable named [RESOURCE]_[PROPERTY]. For instance, the Uri property of a resource called messaging becomes MESSAGING_URI.
Additional documentation
Feedback & contributing
| Product | Versions 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. |
-
net8.0
- Aspire.Hosting (>= 13.4.6)
- AspNetCore.HealthChecks.Kafka (>= 9.0.0)
- AspNetCore.HealthChecks.Uris (>= 9.0.0)
- Confluent.Kafka (>= 2.14.0)
- Google.Protobuf (>= 3.34.1)
- Grpc.AspNetCore (>= 2.80.0)
- Grpc.Net.ClientFactory (>= 2.80.0)
- Grpc.Tools (>= 2.80.0)
- Humanizer.Core (>= 3.0.10)
- JsonPatch.Net (>= 3.3.0)
- KubernetesClient (>= 19.0.2)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.8)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.27)
- Microsoft.Extensions.FileSystemGlobbing (>= 10.0.8)
- Microsoft.Extensions.Hosting (>= 10.0.8)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Http (>= 10.0.8)
- Microsoft.Extensions.Logging (>= 10.0.8)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Options (>= 10.0.8)
- Microsoft.Extensions.Primitives (>= 10.0.8)
- ModelContextProtocol (>= 1.3.0)
- Newtonsoft.Json (>= 13.0.4)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.15.3)
- OpenTelemetry.Extensions.Hosting (>= 1.15.3)
- Polly.Core (>= 8.6.6)
- Semver (>= 3.0.0)
- StreamJsonRpc (>= 2.25.29)
- System.IO.Hashing (>= 10.0.8)
- System.Text.Json (>= 10.0.8)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Aspire.Hosting.Kafka:
| Package | Downloads |
|---|---|
|
Mack.Aspire.Hosting.SchemaRegistry
Package Description |
GitHub repositories (5)
Showing the top 5 popular GitHub repositories that depend on Aspire.Hosting.Kafka:
| Repository | Stars |
|---|---|
|
oskardudycz/EventSourcing.NetCore
Examples and Tutorials of Event Sourcing in .NET
|
|
|
JasperFx/wolverine
Supercharged .NET server side development!
|
|
|
foxminchan/BookWorm
The practical implementation of Aspire using Microservices, AI-Agents
|
|
|
daohainam/microservice-patterns
Microservice pattern demos (Saga, EventSourcing, CQRS...) running on .NET Aspire
|
|
|
PacktPublishing/Pragmatic-Microservices-with-CSharp-and-Azure
Pragmatic Microservices with C# and Azure, published by Packt
|
| Version | Downloads | Last Updated |
|---|---|---|
| 13.4.6 | 7,916 | 6/19/2026 |
| 13.4.5 | 4,037 | 6/17/2026 |
| 13.4.4 | 4,506 | 6/15/2026 |
| 13.4.3 | 5,472 | 6/8/2026 |
| 13.4.2 | 6,027 | 6/3/2026 |
| 13.4.1 | 422 | 6/3/2026 |
| 13.4.0 | 6,581 | 6/1/2026 |
| 13.3.5 | 17,796 | 5/21/2026 |
| 13.3.4 | 1,482 | 5/19/2026 |
| 13.3.3 | 14,501 | 5/15/2026 |
| 13.3.2 | 3,763 | 5/14/2026 |
| 13.3.1 | 1,552 | 5/12/2026 |
| 13.3.0 | 8,541 | 5/7/2026 |
| 13.2.4 | 48,506 | 4/24/2026 |
| 13.2.3 | 9,202 | 4/21/2026 |
| 13.2.2 | 21,655 | 4/8/2026 |
| 13.2.1 | 14,139 | 3/31/2026 |
| 13.2.0 | 27,821 | 3/23/2026 |
| 13.1.3 | 12,280 | 3/19/2026 |
| 13.1.2 | 81,190 | 2/26/2026 |