go-messaging
Installation
SKILL.md
When to Use
- Publishing domain events after state changes
- Subscribing to events from other services
- Choosing a messaging backend for the project
- Implementing async workflows (notifications, emails, analytics)
Critical Patterns
| Pattern | Rule |
|---|---|
| Interface in domain | EventPublisher is a domain port |
| Implementation swappable | NATS, RabbitMQ, or Pub/Sub behind same interface |
| Events are immutable facts | Past tense: BookingCreated, PaymentCompleted |
| Events carry data | Include enough data so consumers don't need to call back |
| Idempotent consumers | Subscribers MUST handle duplicate messages |
| Cloud agnostic | Application layer never imports messaging SDK |
Event Definition (Domain)
Related skills