简体   繁体   English

使用AWS SNS的预定通知

[英]Scheduled notifications with AWS SNS

I'm developing an iOS app using AWS for the first time. 我是第一次使用AWS开发iOS应用程序。 Most things are straight forward, but I'm having trouble finding out how to schedule a push notification in the future. 大多数事情都是直截了当的,但我很难找到如何在将来安排推送通知。 I'm currently using AWSSNSPublishInput to send a push immediately, but there doesn't appear to be any way to schedule the notification for some date-time in the future. 我目前正在使用AWSSNSPublishInput立即发送推送,但似乎没有任何方法可以在将来某个日期时间安排通知。 I would just use UILocalNotification to schedule the future notification, but I need to schedule the notification for a different user. 我只想使用UILocalNotification来安排未来的通知,但我需要为不同的用户安排通知。

For example, user A performs an action that user B needs to know about the next day. 例如,用户A执行用户B关于第二天需要知道的动作。

Anyone have any ideas? 有人有主意吗?

Amazon Simple Notification Service (SNS) is designed to send notifications immediately. Amazon Simple Notification Service(SNS)旨在立即发送通知。 There is no functionality for scheduling notifications in SNS. 在SNS中没有用于安排通知的功能。

Amazon Simple Queue Service (SQS) does have a delay feature, but only up to 15 minutes -- this is useful if you need to do some work before the message is processed, such as copying related data to Amazon S3. Amazon Simple Queue Service(SQS)确实具有延迟功能,但最多只有15分钟 - 如果您需要在处理消息之前做一些工作(例如将相关数据复制到Amazon S3),这将非常有用。

Given that, you need to schedule notification for some future time. 鉴于此,您需要安排将来的通知。 you need to implement the logic yourself on server side like database polling after some fixed interval of time OR something like job scheduler . 您需要在服务器端自己实现逻辑,例如在一段固定的时间间隔之后进行数据库轮询或类似于作业调度程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM