Hotel communication microservice -
in microservice architecture hotel want create communication service handle emails, sms, ... service should triggered asynchronous events.
should these events called: send_reservation_confirmation_email, making reservation service aware of email communication. or should there more generic event reservation_confirmed, resulting in confirmation email?
should these events called: send_reservation_confirmation_email
no. events should named sentences in past.
making reservation service aware of email communication
i not make coupling. reservation service responsible reservations, not methods of notifying customers.
or should there more generic event reservation_confirmed, resulting in confirmation email?
yes, reservation_confirmed
seems choice; represent what had happened , not contain indication of should done next. workflow/process of notifying customer should managed component, i.e. saga/process manager. saga receive reservation_confirmed
event , send send_reservation_confirmation_email
command responsible microservice.
Comments
Post a Comment