Back to skills
SKILL.md
Messaging Patterns
ASecurityBroker-independent messaging patterns — transactional outbox and inbox, idempotent consumers, retries and dead-letter queues, poison messages, ordering, competing consumers, request-reply, saga orchestration, message envelopes and tracing. Use whenever services exchange messages or jobs (outbox, idempotent consumer, DLQ, retry, saga, message queue).
- 5 stars
- 0 votes
- 0 copies
- 0 views
- Added December 3, 2026
Works with
Security analysis
100/100npx -y skills add vectora-os/kit --skill messaging-patterns --agent claude-codeAre you the author of Messaging Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vectora-os-messaging-patterns)---
name: messaging-patterns
description: Broker-independent messaging patterns — transactional outbox and inbox, idempotent consumers, retries and dead-letter queues, poison messages, ordering, competing consumers, request-reply, saga orchestration, message envelopes and tracing. Use whenever services exchange messages or jobs (outbox, idempotent consumer, DLQ, retry, saga, message queue).
metadata:
category: messaging
---
# Messaging patterns
## Purpose
Exchange messages reliably regardless of the broker.
**Use when:** any async messaging or background jobs.
**Not for:** broker selection.
## Inputs
- Flows, consistency needs.
## Outputs
- Pattern choices, envelope, retry/DLQ policy, tests.
## Read first
- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "messaging patterns"` for prior decisions, patterns and anti-patterns.
## Steps
1. **Publish.** Use the transactional outbox for DB-coupled events.
Done when no dual writes.
2. **Consume.** Inbox/dedup table or idempotent handlers by message id.
Done when duplicates are harmless.
3. **Failures.** Bounded retries with backoff; DLQ with alert and replay tool.
Done when poison messages are isolated.
4. **Envelope.** id, type, version, timestamp, trace context, tenant.
Done when all messages conform.
## Best practices
- Design for at-least-once delivery.
- Make replay a supported operation.
## Common mistakes
- Publishing inside a DB transaction directly to the broker.
- Retrying forever.
## Example
Invoice events via outbox relay; consumers dedupe on `messageId` in an inbox table; DLQ replay CLI.
## Reusable prompt
```text
Apply the Messaging patterns skill (.agents/skills/messaging-patterns/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Apply outbox/inbox, idempotency, retry/DLQ and envelope standards to the message flows.
Return: Pattern choices, envelope, retry/DLQ policy, tests..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.