Mack.Aspire.Hosting.SchemaRegistry 1.0.0

dotnet add package Mack.Aspire.Hosting.SchemaRegistry --version 1.0.0
                    
NuGet\Install-Package Mack.Aspire.Hosting.SchemaRegistry -Version 1.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="Mack.Aspire.Hosting.SchemaRegistry" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Mack.Aspire.Hosting.SchemaRegistry" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Mack.Aspire.Hosting.SchemaRegistry" />
                    
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 Mack.Aspire.Hosting.SchemaRegistry --version 1.0.0
                    
#r "nuget: Mack.Aspire.Hosting.SchemaRegistry, 1.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 Mack.Aspire.Hosting.SchemaRegistry@1.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=Mack.Aspire.Hosting.SchemaRegistry&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Mack.Aspire.Hosting.SchemaRegistry&version=1.0.0
                    
Install as a Cake Tool

Aspire Hosting Confluent Schema Registry

A .NET Aspire hosting integration for running Confluent Schema Registry alongside a Kafka resource.

This package provides the following Aspire extension method:

builder.AddSchemaRegistry(string name, int? port = null)

It runs Confluent Schema Registry using the Docker image:

docker.io/confluentinc/cp-schema-registry:7.7.8

Basic Usage

Schema Registry requires a Kafka resource reference.

var builder = DistributedApplication.CreateBuilder(args);

var kafka = builder.AddKafka("kafka");

var registry = builder
    .AddSchemaRegistry("schema")
    .WithReference(kafka);

builder.Build().Run();

This creates:

Kafka resource:             kafka
Schema Registry resource:   schema

Usage With a Custom Port You can expose Schema Registry on a specific host port by passing the optional port parameter:

var builder = DistributedApplication.CreateBuilder(args);

var kafka = builder.AddKafka("kafka");

var registry = builder
    .AddSchemaRegistry("schema", port: 8081)
    .WithReference(kafka);

builder.Build().Run();

When a fixed port is provided, Schema Registry will be available locally at:

http://localhost:8081

When no port is provided, Aspire will allocate a port automatically. Required Kafka Reference Schema Registry must be connected to Kafka. Always create the Kafka resource first:

var kafka = builder.AddKafka("kafka");

Then add Schema Registry and reference Kafka:

var registry = builder
    .AddSchemaRegistry("schema")
    .WithReference(kafka);

Referencing Schema Registry From Another Resource You can reference the Schema Registry resource from another Aspire project, service, worker, or API.

using Aspire.Hosting;

var builder = DistributedApplication.CreateBuilder(args);

var kafka = builder.AddKafka("kafka");

var schemaRegistry = builder
    .AddSchemaRegistry("schema")
    .WithReference(kafka);

var api = builder
    .AddProject<Projects.MyApi>("api")
    .WithReference(kafka)
    .WithReference(schemaRegistry);

builder.Build().Run();
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

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.0.0 81 6/29/2026