configuring-dapr-pubsub

Configures Dapr pub/sub components with Kafka or Redis for event-driven microservices.

9|2|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/AbdullahMalik17/Hacathan_5 --skill configuring-dapr-pubsub-abdullahmalik17
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: configuring-dapr-pubsub
Source: https://github.com/AbdullahMalik17/Hacathan_5/tree/main/.claude/skills/configuring-dapr-pubsub
Command: npx skills add https://github.com/AbdullahMalik17/Hacathan_5 --skill configuring-dapr-pubsub-abdullahmalik17

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Setting up reliable event-driven communication between microservices requires correctly configuring Dapr pub/sub components, subscriptions, and sidecar deployments, which involves many error-prone YAML and code details. ## Core Features & Use Cases - Component Configuration: Ready-to-use Dapr Component manifests for Kafka (including SASL authentication) and Redis backends, with consumer group, retry, and performance settings. - Subscription & Publishing Patterns: Declarative Subscription CRDs and programmatic FastAPI subscription endpoints, plus publishing via the Dapr sidecar HTTP API with CloudEvent metadata. - Kubernetes & Local Development: Deployment manifests with Dapr sidecar annotations, component scoping, Dapr CLI commands, and Docker Compose setups. - Use Case: A triage agent receives a user question and routes it by publishing to a concepts-request or debug-request topic; specialist agents subscribe through Dapr and publish responses back to a response-ready topic. ## Quick Start Ask the assistant to generate a Dapr Kafka pub/sub component and a FastAPI subscriber for a topic such as task-created, then apply it with kubectl.

Frequently Asked Questions about configuring-dapr-pubsub

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure a Dapr pub/sub component with Kafka?▼

Create a Dapr Component manifest with type pubsub.kafka, set the brokers address, authType, and consumerGroup metadata, then apply it with kubectl apply. Applications access it through the Dapr sidecar HTTP API on port 3500.

How to subscribe to Dapr pub/sub topics in FastAPI?▼

Expose a GET /dapr/subscribe endpoint returning a list of pubsubname, topic, and route objects, then implement a POST handler at that route. Incoming messages arrive as CloudEvents, so read the payload from the data field.

Should I use Kafka or Redis for Dapr pub/sub?▼

Use Kafka for production workloads needing consumer groups, retries, and durable event streams. Use Redis for development or simple scenarios where lightweight messaging without broker management is sufficient.

Does Dapr pub/sub support SASL authentication with Kafka?▼

Yes, set authType to password and provide saslUsername, saslPassword, and saslMechanism such as SCRAM-SHA-256 in the component metadata. Store the password in a Kubernetes Secret and reference it with secretKeyRef.

Why is my Dapr subscriber not receiving events?▼

Common causes are a component not loaded from the resources path, a wrong topic or route in the subscription, or an unreachable broker. Check sidecar logs with kubectl logs on the daprd container and verify registration via the /v1.0/metadata endpoint.

When should I not use Dapr pub/sub?▼

Avoid it when you need direct Kafka client features like manual partition assignment or exact offset control, since Dapr abstracts the broker. It also adds a sidecar per pod, which may not fit extremely resource-constrained deployments.