Skip to content
Ameen Abozaid
Planned lessonSRB-002-L02

Kinds of events and when to use each

  • Lesson 2 of 7
  • Senior B
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.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.