Creating a microservice for alerts
The Alert service is used to send email alerts and SMS. Alerts can be generated at various levels by other microservices. For example, successful creation of a consumer, provider, service, or an order may require an email to be sent to the relevant stakeholders. Similarly, alerts may be required whenever there is a change in the status of the order or a rating is received. The Alert service does not maintain a local database, it just generates events for each successful alert sent that can be tracked for monitoring purposes. The following table lists the endpoints for the Alert service:
URI | Params | Description |
|
| Sends an alert via email to one or more recipients. |
|
| Sends an alert via SMSÂ to one or more recipients. |
Adding routes
Mostly, the Alert service will listen for events as an Observer and will not receive requests to send alerts via routes. If it is required to send alerts synchronously, the /alerts...