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

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -