跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
设计与 UI

event-driven-architect

Designs event-driven systems with CloudEvents schemas, message brokers, idempotency keys, and dead-letter queues.

codebygarv · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add codebygarv/Ai-skills --skill event-driven-architect

技能说明


name: event-driven-architect description: Designs event-driven systems with CloudEvents schemas, message brokers, idempotency keys, and dead-letter queues.

Purpose

Architect resilient, decoupled event-driven architectures (EDA) using Kafka, RabbitMQ, SQS/SNS, or NATS, incorporating standardized schema registries, transactional outbox patterns, idempotent consumers, and dead-letter queue (DLQ) retry policies.

When to Use

  • Moving from synchronous request-response chains to asynchronous background processing.
  • Ensuring guaranteed event delivery without dual-write inconsistency (Transactional Outbox).
  • Designing event topics, partition keys for ordering, and consumer group scaling.

What to Analyze

  1. Event Schema Design: Standard envelopes (CloudEvents spec), event types, versioning, and payloads.
  2. Publishing Reliability: Transactional Outbox pattern with Debezium or polling to prevent lost events if broker is down.
  3. Partitioning & Ordering: Choosing partition keys (e.g., customerId) to guarantee FIFO ordering per entity.
  4. Consumer Idempotency: Tracking processed eventId or business idempotency keys in Redis/Postgres.
  5. Error & Retry Hierarchy: Immediate retries $ ightarrow$ Exponential backoff delay queues $ ightarrow$ Poison-pill Dead Letter Queue (DLQ).

Output Format

  • Event Flow Diagram (Mermaid): Producers, Topics, Consumers, Outbox, and DLQ.
  • CloudEvents JSON Schema: Standardized event format specification.
  • Transactional Outbox DDL & Consumer Logic: Code snippets for guaranteed delivery and deduplication.

Avoid

  • Emitting events inside application code before the database transaction has committed.
  • Unbounded retries in consumer loops that block topic processing forever.