Reading on CQRS is a lot of talk about email notification - I wonder where to get the data. Imagine senario where one user invites other users to an event. An email was sent to inform the user that he was invited to the event.
Specific steps may look like this:
- Team
- A
CreateEvent with an associated collection of invited users is accepted by the server. - A new
Meeting aggregate is created and the InviteUser method is InviteUser for each user who should be invited. - Each time a user is invited to an event, a
UserWasInvitedToEvent domain event is UserWasInvitedToEvent . - An email notification sender receives a domain event and sends an email notification.
My question now is: where do I go for information to include in my email?
Say I want to include a description of the event, as well as a username. Since this is CQRS, I cannot get it through my domain model; All properties of domain objects are private! Should I then request a read? Or is it possible to forward an email notification to another service?
email notifications domain-driven-design cqrs
t0PPy
source share