kafka-pipeline template
Kafka source consuming orders.created, enrichment via Haiku, re-emit to orders.enriched, DLQ on orders.dlq. Declares dailyTokenUSD: 5 to exercise Phase-6 cost enforcement.
Scaffold
declaragent init --template kafka-pipeline --provider anthropic
Ships with a Redpanda docker-compose.yaml for the local dev loop.
Canonical starter: templates/kafka-pipeline/.
Run locally
cd kafka-pipeline
docker compose up -d # Redpanda single-broker
declaragent daemon &
# produce a test event
rpk topic produce orders.created --brokers localhost:19092 \
< fixtures/order.json
Expected flow:
- Source adapter consumes
orders.created. - Engine runs the
enrich-orderskill. - Engine emits the enriched JSON to
orders.enriched. - On error, the message goes to
orders.dlqwith the failure metadata.
Key points
- DLQ. Every source declares its DLQ topic. See
declaragent dlq list / show / redrive. - Cost budget.
dailyTokenUSD: 5tripsEQUOTAwhen exceeded. The source pauses consumption until the next UTC rollover. - Idempotency. The message's Kafka
(topic, partition, offset)is the idempotency key — re-processing is safe on restart.
[placeholder — landing 2026-Q2] Grafana screenshot: source.messages.processed climbing against the DLQ gauge.