eventlisted
Install: claude install-skill arbazkhan971/godmode
# Event -- Event-Driven Architecture
## Activate When
- User invokes `/godmode:event`
- User says "event sourcing", "CQRS", "message broker"
- User says "Kafka", "RabbitMQ", "dead letter queue"
- When building loosely coupled async systems
## Workflow
### Step 1: Event Architecture Assessment
```bash
# Detect message broker infrastructure
ls kafka/ docker-compose*.yml 2>/dev/null \
| head -5
grep -rl "kafkajs\|amqplib\|@aws-sdk/client-sqs" \
package.json pyproject.toml 2>/dev/null
# Check for event schemas
find . -name "*.avsc" -o -name "*.proto" \
-o -path "*/events/*" | head -10
```
```
EVENT ARCHITECTURE CONTEXT:
Current State: No events | Basic pub/sub | Full CQRS/ES
Throughput: <events per second>
Ordering: None | Per-entity | Global
Retention: <how long to store events>
IF throughput > 10K/s: recommend Kafka
IF ordering per-entity only: Kafka partitions by key
IF need replay: Kafka or NATS JetStream (not RabbitMQ)
IF simple fan-out: SNS/SQS or RabbitMQ
```
### Step 2: Broker Selection
```
MESSAGE BROKER SELECTION:
| Feature | Kafka | RabbitMQ | SQS/SNS | NATS |
|-----------|--------|----------|---------|-------|
| Throughput| V.High | High | High | V.High|
| Latency | ~5ms | ~1ms | ~50ms | ~0.1ms|
| Ordering | Per-pt | Per-q | FIFO opt| Per-sb|
| Replay | Yes | No | No | Yes* |
THRESHOLDS:
Kafka: use when > 10K events/sec or need replay
RabbitMQ: use when < 10K/sec and need routing
SQS/SNS: use when AWS-n