Aspire.Hosting.Kafka
13.6.5
Prefix Reserved
dotnet add package Aspire.Hosting.Kafka --version 13.6.5
NuGet\Install-Package Aspire.Hosting.Kafka -Version 13.6.5
<PackageReference Include="Aspire.Hosting.Kafka" Version="13.6.5" />
<PackageVersion Include="Aspire.Hosting.Kafka" Version="13.6.5" />
<PackageReference Include="Aspire.Hosting.Kafka" />
paket add Aspire.Hosting.Kafka --version 13.6.5
#r "nuget: Aspire.Hosting.Kafka, 13.6.5"
#:package Aspire.Hosting.Kafka@13.6.5
#addin nuget:?package=Aspire.Hosting.Kafka&version=13.6.5
#tool nuget:?package=Aspire.Hosting.Kafka&version=13.6.5
Apache Kafka hosting integration
Use this integration to model, configure, and orchestrate a Kafka resource in an Aspire solution.
Getting started
Add the integration
From your AppHost directory, add the Aspire.Hosting.Kafka integration with the Aspire CLI:
aspire add Aspire.Hosting.Kafka
Usage example
In the AppHost, add a Kafka resource and reference it from another resource with either C# or TypeScript:
C#
var kafka = builder.AddKafka("messaging");
var myService = builder.AddProject<Projects.MyService>()
.WithReference(kafka);
TypeScript
const kafka = await builder.addKafka("messaging");
const myService = await builder.addNodeApp("myService", "../my-service", "server.js")
.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
- https://aspire.dev/integrations/gallery/
- https://aspire.dev/integrations/messaging/apache-kafka/apache-kafka-host/
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.6.5)
- AspNetCore.HealthChecks.Kafka (>= 9.0.0)
- AspNetCore.HealthChecks.Uris (>= 9.0.0)
- Confluent.Kafka (>= 2.15.0)
- Google.Protobuf (>= 3.36.1)
- Grpc.AspNetCore (>= 2.83.0)
- Grpc.Net.ClientFactory (>= 2.83.0)
- Grpc.Tools (>= 2.83.0)
- Hex1b (>= 0.168.0)
- KubernetesClient (>= 19.0.2)
- MessagePack (>= 2.5.307)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.14)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.14)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.33)
- Microsoft.Extensions.FileSystemGlobbing (>= 10.0.14)
- Microsoft.Extensions.Hosting (>= 10.0.14)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Http (>= 10.0.14)
- Microsoft.Extensions.Logging (>= 10.0.14)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Options (>= 10.0.14)
- Microsoft.Extensions.Primitives (>= 10.0.14)
- ModelContextProtocol (>= 1.4.1)
- Newtonsoft.Json (>= 13.0.4)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.17.0)
- OpenTelemetry.Extensions.Hosting (>= 1.17.0)
- Polly.Core (>= 8.7.0)
- Semver (>= 3.0.0)
- StreamJsonRpc (>= 2.25.29)
- System.IO.Hashing (>= 10.0.14)
- System.Text.Json (>= 10.0.14)
- YamlDotNet (>= 18.1.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Aspire.Hosting.Kafka:
| Package | Downloads |
|---|---|
|
Girvs.Aspire.Hosting
Package Description |
|
|
Shirubasoft.Aspire.Extensions.Kafka
Schema Registry and topic resources for Aspire Kafka AppHosts. |
|
|
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
A reference architecture for Aspire microservices implementing MCP, A2A, AG-UI, and A2UI agent stack
|
|
|
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.6.5 | 19,719 | 11/10/2026 |
| 13.6.4 | 39,880 | 10/24/2026 |
| 13.6.3 | 22,655 | 10/21/2026 |
| 13.6.2 | 3,883 | 10/20/2026 |
| 13.6.1 | 33,875 | 10/7/2026 |
| 13.6.0 | 29,434 | 9/29/2026 |
| 13.5.4 | 44,873 | 9/15/2026 |
| 13.5.3 | 73,020 | 8/25/2026 |
| 13.5.2 | 12,259 | 8/21/2026 |
| 13.5.1 | 4,654 | 8/20/2026 |
| 13.5.0 | 19,451 | 8/18/2026 |
| 13.4.6 | 181,210 | 6/19/2026 |
| 13.4.5 | 12,276 | 6/17/2026 |
| 13.4.4 | 28,355 | 6/15/2026 |
| 13.4.3 | 15,513 | 6/8/2026 |
| 13.4.2 | 19,158 | 6/3/2026 |
| 13.4.1 | 904 | 6/3/2026 |
| 13.4.0 | 25,641 | 6/1/2026 |
| 13.3.5 | 41,582 | 5/21/2026 |
| 13.3.4 | 2,540 | 5/19/2026 |