DEV Community

Discussion on: Why Event Sourcing is a microservice communication anti-pattern

Collapse
 
mnieber profile image
Maarten Nieber

Hi Oliver,

I agree that we should be careful with exposing Domain Events outside of the Bounded Context (this seems to be the main message of the article), but on the other hand it's fine to communicate between micro-services using Domain Events, as long as these micro-services are in the same Bounded Context, isn't it?

Collapse
 
olibutzki profile image
Oliver Libutzki

It's fine to expose domain events. You have to think about the payload. It's also wanted that other bounded context react in those events.

The main message is "Don't use fine-grained event sourcing events as domain events."

Collapse
 
mnieber profile image
Maarten Nieber

So far, I thought that the Domain Events are exactly the events that you source from. Is there a reason to distinguish between Domain Events and Event Sourcing Events? In other words, when you want to do Event Sourcing, shouldn't Domain Events be stored in such a way that you can later construct Entities from them?

Thread Thread
 
olibutzki profile image
Oliver Libutzki

In my opinion the article answers your questions.

Thread Thread
 
mnieber profile image
Maarten Nieber

Hmm, okay, I think I got some insight to where we disagree. In any case, thanks for the write-up, I'm new to this pattern and it triggered some interesting thoughts.