# Event Processing

> Use when designing event producers, event consumers, outbox patterns, and duplicate event deduplication.

- Skill: `sahilkhan30/event-processing` (Agent Skill)
- Install (CLI): `npx skillmds@latest add sahilkhan30/event-processing`
- Raw SKILL.md: https://api.skillmd.com/api/skills/sahilkhan30/event-processing/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: SahilKhan30 (https://skillmd.com/u/sahilkhan30)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/sahilkhan30/event-processing

---


# Event Processing & Outbox Skill

## Purpose
Standardize transactional event publication, sequence/version ordering, and duplicate event deduplication across channels.

---

## 1. Rules of Engagement

### MANDATORY
- Deduplicate incoming events using composite unique constraint locks (`UNIQUE(source, event_id)`).
- **Event Ordering**: Prefer explicit provider versioning/sequence numbers (`event.sequenceNumber`) over un-synchronized system clock timestamps (`event.timestamp`). If timestamp ordering is used, record the clock drift assumption in `docs/assumptions.md`.
- Ensure event handlers are idempotent. Re-delivering an identical event MUST produce identical system state without double-counting side effects.

### CONDITIONAL
- **Transactional Outbox**: Use Transactional Outbox pattern when events must be reliably published to message brokers (Kafka/RabbitMQ) atomically with database transactions.

