Events

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.

Get hands-on with 1400+ tech skills courses.