What is the purpose of using DomainEvents? #172
Unanswered
Synergia503
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Hi, @Synergia503. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
Thanks for your good job with that project. It helps me a lot!
However, I don't understand the purpose of DomainEvents in your Domain. There are no dispatchers for them, take as an example:
I thought once, that every event should have its dispatcher to dispatch changes that are carried by this event. What am I missing here? Why only events between modules are somehow handled?
Take this: NewMeetingHostSetDomainEvent -> it is called in SetAsHost() method in MeetingAttendee Entity. This event is created and added to DomainEvents collection for this Entity and nothing more happens. I am aware of GetAllDomainEventsmethod in DomainEventsAccessor and DispatchEventsAsync in DomainEventsDispatcher and await _mediator.Publish(domainEvent) in the foreach loop. But... there is no Subscriber to this particular NewMeetingHostSetDomainEvent? Or I cannot find it? If there is some Subscriber for this event, where is it? If there isn't, what's the purpose of these events?
Beta Was this translation helpful? Give feedback.
All reactions