How to send notification to everyone except the initiator in Amazon SNS Topics?

I am using Amazon SNS for handling push notifications. Its doing an amazing job. But I am having an issue with SNS Topics, where one can group multiple ARNs into a single topic ARN.

Problem. Suppose I create a Group. I create a Topic ARN of the club. Then when someone joins the group, I take their individual ARNs and subscribe it to the Club's Topic ARN. This way, when I need to send a notification to the members of that particular group, I just have to send a push notification to the Club's Topic ARN. This saves a lot of processing from my side, because otherwise I would have had to loop through all the member's ARN and send the push notification one by one.

The simple yet irritating problem that comes with Topics that has not yet been resolved by Amazon is that, if u are the creator of the notification. For example, you updated the Group Name, and the generated notification would be "ABC changed the group name". This notification would go to all the members of the Group since we are publishing via. the group's topic(which has all the members subscribed to it), and ABC himself gets the notification as well(which is completely unnecessary and irritating for a user).

The solution that I thought about this is, Unsubscribing (Creator's)ABC's ARN from the Club's topic ARN before publishing the push notification, and then after the notification is published subscribe him to the Topic Again.

This seems like a legit solution that should work, but I am not sure if it's the right way. Will this take more time? Is there a better way around this?

链接地址: http://www.djcxy.com/p/32216.html

上一篇: 亚马逊SNS:无法获得应用程序端点

下一篇: 如何向Amazon SNS主题中的发起人以外的所有人发送通知?