Aspire.Hosting.Kafka
17.0.0
Prefix Reserved
dotnet add package Aspire.Hosting.Kafka --version 17.0.0
NuGet\Install-Package Aspire.Hosting.Kafka -Version 17.0.0
<PackageReference Include="Aspire.Hosting.Kafka" Version="17.0.0" />
<PackageVersion Include="Aspire.Hosting.Kafka" Version="17.0.0" />
<PackageReference Include="Aspire.Hosting.Kafka" />
paket add Aspire.Hosting.Kafka --version 17.0.0
#r "nuget: Aspire.Hosting.Kafka, 17.0.0"
#:package Aspire.Hosting.Kafka@17.0.0
#addin nuget:?package=Aspire.Hosting.Kafka&version=17.0.0
#tool nuget:?package=Aspire.Hosting.Kafka&version=17.0.0
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
aspire add Aspire.Hosting.Dotnet
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.AddDotnetProject("myservice", "../MyService/MyService.csproj")
.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 | 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 (>= 17.0.0)
- 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.173.0)
- KubernetesClient (>= 19.0.2)
- MessagePack (>= 2.5.307)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.15)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.15)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.15)
- Microsoft.Extensions.FileSystemGlobbing (>= 10.0.15)
- Microsoft.Extensions.Hosting (>= 10.0.15)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Http (>= 10.0.15)
- Microsoft.Extensions.Logging (>= 10.0.15)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Options (>= 10.0.15)
- Microsoft.Extensions.Primitives (>= 10.0.15)
- ModelContextProtocol (>= 1.4.1)
- Newtonsoft.Json (>= 13.0.4)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.18.0)
- OpenTelemetry.Extensions.Hosting (>= 1.18.0)
- Polly.Core (>= 8.7.0)
- Semver (>= 3.0.0)
- StreamJsonRpc (>= 2.25.29)
- System.IO.Hashing (>= 10.0.15)
- 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
Reference architecture for building agentic applications with Aspire microservices and micro frontends, integrating MCP, A2A, AG-UI, and A2UI
|
|
|
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 |
|---|---|---|
| 17.0.0 | 6,961 | 11/18/2026 |
| 13.6.5 | 62,020 | 11/10/2026 |
| 13.6.4 | 45,764 | 10/24/2026 |
| 13.6.3 | 28,115 | 10/21/2026 |
| 13.6.2 | 4,527 | 10/20/2026 |
| 13.6.1 | 36,710 | 10/7/2026 |
| 13.6.0 | 31,616 | 9/29/2026 |
| 13.5.4 | 46,020 | 9/15/2026 |
| 13.5.3 | 74,375 | 8/25/2026 |
| 13.5.2 | 12,274 | 8/21/2026 |
| 13.5.1 | 4,972 | 8/20/2026 |
| 13.5.0 | 19,593 | 8/18/2026 |
| 13.4.6 | 185,604 | 6/19/2026 |
| 13.4.5 | 12,392 | 6/17/2026 |
| 13.4.4 | 28,866 | 6/15/2026 |
| 13.4.3 | 15,803 | 6/8/2026 |
| 13.4.2 | 19,208 | 6/3/2026 |
| 13.4.1 | 911 | 6/3/2026 |
| 13.4.0 | 25,673 | 6/1/2026 |
| 13.3.5 | 42,256 | 5/21/2026 |