Search⌘ K

Events

Understand how events function within asynchronous microservices to enhance system flexibility and decoupling. Learn about the challenges of data transfer in event-driven architectures, the importance of bounded contexts in domain-driven design, and strategies to manage event data for different microservices. This lesson helps you grasp how to implement effective event communication while maintaining clear boundaries and minimizing hidden dependencies.

Introduction #

With asynchronous communication, the coupling of systems can be driven to different lengths. As already mentioned:

  • The system for order processing could inform the invoice system asynchronously that an invoice has to be written.
  • The ordering system thus determines exactly what the invoicing system has to do: generate an invoice.
  • It also sends a message to the bounded context shipping to trigger the delivery.

The system can also be set up differently. The focus will then be on an event like, “There is a new order.” Every microservice can react appropriately to this:

  • The invoicing system can write an invoice.
  • The shipping system can prepare the goods for delivery.

Each microservice decides for itself how it reacts to the events, see the drawing below.

This leads to better decoupling. If a microservice has to react differently to a new order, the microservice ...