My system runs in the Amazon autoscale group, and one feature allows the user to send messages to users, and I can use the following use case.
- A new message is sent in my application between users.
- The user notification email is thrown into the queue with a delay of 60 seconds. This delay allows time for the real-time chat client (faye / angularjs) to see the message and mark it as viewed.
- After the delay, the message is picked up, the βreadβ status is checked, and if the client has not been read by the client, an email is sent.
Initially, I was going to use cronjob on each polling server server in the message queue, however it seems to me that it would be more efficient to use SNS to call some kind of email sending endpoint (possibly in Lambda).
I don't see any way to poll SQS SNS, can anyone suggest how this can be done? Essentially, I want a delayed SNS so as not to spam someone in a live chat with email alerts.
thanks
source share