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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aspire.Hosting.Kafka" Version="17.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aspire.Hosting.Kafka" Version="17.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Aspire.Hosting.Kafka" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aspire.Hosting.Kafka --version 17.0.0
                    
#r "nuget: Aspire.Hosting.Kafka, 17.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Aspire.Hosting.Kafka@17.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Aspire.Hosting.Kafka&version=17.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Aspire.Hosting.Kafka&version=17.0.0
                    
Install as a Cake Tool

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

Feedback & contributing

https://github.com/microsoft/aspire

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed