abrahamvilchesdelacruz/ididntcatchthat/api-events-infra
Claude Code and agent skill by abrahamvilchesdelacruz/ididntcatchthat
- community
Checking that the SKILL.md file is still in the repository.
AmqpMessageBus, SubscribersBootstrapper, retry, DLQ, idempotencia en apps/api/. Trigger: Al implementar AmqpMessageBus, configurar SubscribersBootstrapper, o entender retry y DLQ.
Install
npx vskill@latest install abrahamvilchesdelacruz/ididntcatchthat/api-events-infraSKILL.md
The same SKILL.md was published earlier as abrahamvilchesdelacruz/ididntcatchthat/api-events-infra.
When to Use
- Al implementar o modificar
AmqpMessageBus - Al registrar subscribers en módulos NestJS
- Al diseñar la política de retry o idempotencia
Leereferences/docs.mdpara skills relacionadas, ADRs y documentación externa.
Leereferences/amqp-message-bus.mdpara la implementación completa deAmqpMessageBus,SubscribersBootstrappery el registro en módulos.
Concepto
AmqpMessageBus implementa tres interfaces a la vez:
SubscribersBootstrapper llama a subscriber.init() en onModuleInit() — registra todos los consumers al arrancar.
Retry Policy
| Intento | Delay | Mecanismo | |
|---|---|---|---|
| 1 | 1 s | expiration: "1000" en .retry → vuelve vía DLX | |
| 2 | 5 s | expiration: "5000" en .retry → vuelve vía DLX | |
| 3 | 10 s | expiration: "10000" en .retry → vuelve vía DLX | |
| 4 | — | → .dead_letter — intervención manual |
El `expiration` es por mensaje, no por cola — permite backoff exponencial con una sola .retry queue.
Colas creadas automáticamente en setupQueues():
{queueName}— cola principal{queueName}.retry— mensajes esperando reintento{queueName}.dead_letter— mensajes agotados
Idempotencia
Opción A — Natural (por defecto)
Opción B — Inbox table (operaciones irreversibles críticas)
Tabla: processed_events(event_id UUID PK, event_name, processed_at) — purgar > 30 días.
Reglas
AmqpMessageBusvive enshared/infrastructure/— es transversal a todos los BCAmqpMessageBusse registra una sola vez enSharedModulecomo singleton víauseExisting; los módulos BC no lo re-registranSubscribersBootstrappery el tokenSUBSCRIBERSse importan desde sharedOnModuleInitsolo enSubscribersBootstrapper— nunca en subscribers ni use casesSUBSCRIBERSse registra conuseFactoryque devuelve un array de subscribers — nuncauseExisting + multi: true- El DLQ no se re-encola automáticamente — requiere fix manual + re-encolado explícito
prefetch(1)siempre — procesamiento secuencial por consumerDomainEventClassesnew (...args: unknown[]) => DomainEvent— nonever, noany- El payload publicado usa el campo
datapara los atributos del evento, noattributesnitoPrimitives() AmqpMessageBustiene reconexión automática: al cerrar la conexión, esperaRECONNECT_DELAY_MSy re-registra todos los consumers
ADR de decisión: docs/adr/019-event-bus-strategy.md
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/api-events-infra/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/abrahamvilchesdelacruz/ididntcatchthat/api-events-infra)