I would like to know how can a domain event be implemented (in DDD) if it is not a natural result of an aggregate's state change.
I will borrow the example of this post.
So lets say that we need an event like: temperatureWasMeasured which could be a product of some modelling we have done (e.g. in an event storming session).
This event feels like a product of some read action and not an actual state change of some aggregate.
So the question is: Where and how this event could make sense to be emmited?.
We could create an entity or an aggregate, which could have a state to count the number of reads in order to be emmited as a state change. But is this really necessary?
In the resources out there, the definition of the "domain event" does not seem to mention state change, but just as something which has happened in the domain.
So an action of a measurement (in a non quantum mechanical environment 😝), is considered to be a domain event, like the temperatureWasMeasured event?
It would be great if someone could clarify these questions, since it seems there is no clear answer out there.