Kinds of events and when to use each
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
choose between notification, state transfer, and domain events.
Planned topics
- Notification: tiny, says something happened; consumers call back for details.
- Event-carried state transfer: full data included; consumers need no callback but copy data.
- Domain event: a business fact in the publisher's language, such as OrderReadyForFulfillment.
- Do not leak internal tables or entities as events.
Draft outline details
Demonstration
three versions of one event: {orderId} (notification); {orderId, lines, address} (state transfer); OrderReadyForFulfillment {orderId, items, promisedDate} (domain). Table of trade-offs: coupling, payload size, privacy.
Check your understanding
Which kind avoids a callback to the publisher?
Show answer
Event-carried state transfer.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.