Back to Catalog
Microservices
Messaging & Events
Domain Event
When something important happens in your domain, shout it out — let interested parties react.
Intent & Description
Real-world Use Case
Order is placed → OrderPlaced event published to Kafka. Inventory Service decrements stock. Shipping Service creates a shipment. Email Service sends confirmation. All independently, all decoupled.
Source
📌 TL;DR
Something happened? Publish an event, don’t make a call. Subscribers react on their own time. Loose coupling at its finest.
Advantages
- Zero coupling between publisher and subscribers
- New consumers can be added without touching the publisher
- Natural fit for event-driven and reactive architectures
- Enables audit trails and event sourcing
Disadvantages
- Eventual consistency — subscribers lag behind the event
- Event schema changes need backward compatibility management
- Debugging event flows across services is non-trivial
- Ordering guarantees needed for some flows (Kafka partitioning)