...

/

Publishing Messages From the Store Management Module

Publishing Messages From the Store Management Module

Understand how to update the application to start publishing messages from the Store Management module.

The integration events we will be publishing from the Store Management module are going to be used by several other modules eventually, but here, only one module will be updated.

In real-world applications, we might not know how many consumers we have, and that is why integration events must be the most stable kind of event we have in our application. As we have stated before, if the event we are dealing with is only used by us and is never stored, we are free to change that event in any way we wish. So, we will not want to publish our domain events or the events we use for our event-sourced aggregates.

Each module exposes only its protocol buffer API, and that is where we will define all new integration events for the Store Management module.

Rules for event creation

We are going to follow a few rules on how we will be creating these events, as follows:

  • The events need to be public, so all the events need to be defined in the storespb package.

  • The ...