Get started with Redpanda integration

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

⭐ Community Toolkit

Redpanda is a Kafka API-compatible streaming platform. The Community Toolkit integration runs a Redpanda broker in a container and exposes its Kafka API, Schema Registry, and Admin API endpoints.

  • An Aspire AppHost project
  • A Kafka client integration for any application that connects to the broker

Install the 📦 CommunityToolkit.Aspire.Hosting.RedPanda package in the AppHost:

Terminal
aspire add CommunityToolkit.Aspire.Hosting.RedPanda

Add a broker and reference it from the client resource. See Set up Redpanda in the AppHost for persistence, resource sizing, and optional web consoles.

apphost.mts
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const redpanda = await builder.addRedPanda('redpanda');
const api = await builder.addProject('api', '../Api/Api.csproj');
await api.withReference(redpanda);
await api.waitFor(redpanda);
await builder.build().run();

The Kafka bootstrap address exposed to referencing resources uses the host:port format. Redpanda can be used with the Aspire Kafka client integration. For client setup, see Connect to Apache Kafka.