Should you publish Domain Events or Integration Events?

Опубликовано: 30 Сентябрь 2024
на канале: CodeOpinion
15,528
615

Common advice is to not publish domain events outside of your service boundary. They should only exist within your service boundary. Instead, you should publish integration events for other service boundaries. While this general advice makes sense, it's not so cut-and-dry. There are many reasons why you would want to publish domain events for other services to consume. Here are how I think of Domain Events and Integration Events and when to use them.

🔗 EventStoreDB
https://eventsto.re/codeopinion

🔔 Subscribe:    / @codeopinion  

💥 Join this channel to get access to source code & demos!
   / @codeopinion  

🔥 Don't have the JOIN button? Support me on Patreon!
  / codeopinion  

📝 Blog: https://codeopinion.com
👋 Twitter:   / codeopinion  
✨ LinkedIn:   / dcomartin  

0:00 Intro
0:27 Domain Events
1:32 Integration Events
3:28 Stability
5:12 Understanding
6:33 Consumer Requirements

#eventdrivenarchitecture #softwarearchitecture #microservices