I am working on an application that involves alerts as well as alert / notification policies. A little about the general design of my system, I am using several small applications that serve a single job (micro services). So I have a service that will do the alert and another that stores and manages the policies. I am also using AWS services such as SNS, SQS and SES.
Below are examples of all the important JSONs.
So, about how everything works, my alert service receives a message from an SQS queue that is produced by another service that I have that makes commercial logic. My alert service then asks the policy service (indirectly) what policy is attached to the message that comes from the alert queue. This policy then contains the number of people attached to the policy, as well as the user's identification of users who are part of the policy and who should receive alerts.
Parts that I need to find out:
- I need to look up all the notification settings for each user. It seems that I can not find the best way to pass and send only the calls to the API that I need for each alert that should be sent
- I need to figure out how to take the notification settings and then alert the correct user through the proper notification method. This means that I want to go through each user and notify the correct user using their notification preferences. But I also want to scale the next user online once
escalate_time Passes for each user.
I'm using Node.js and I'm open to adding anything to the project to make it work the way I want it to. I have full control of all the aforementioned services, since this is a new compilation project that I am doing alone. I should also add that I am open to most AWS services to help solve the problem.
I already know how I want to format the time message by email / sms or a call. I already have that part handled.
How much information would you suggest I do to get the final result I want?
Message received by the alert service of the alert queue
"name": "Example of website",
"code": "ETIMEDOUT", "connect": true
companyID: & # 39; 1 & # 39 ;,
name: & # 39; political name & # 39 ;,
person_one: & # 39; person_oneID & # 39 ;,
person_two: & # 39; person_twoID & # 39 ;,
person_three: & # 39; person_threeID & # 39 ;,
escalate_time: 5, // can be up to 30
Notification part of the user model
Note: The values for the method can be e-mail / sms / call and no matter how much you order or how many are included beyond 1.
Note 2: Contact times can be of any value of 10 or less.