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 indocs/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.