Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I delete SNS endpoints for GCM?

According to the GCM Advanced Topics, under the part of "How unregistration works", GCM notifies the 3rd-party server that a registration id is no longer registered with the device. When we use Amazon SNS, the 3rd-party is Amazon. What I'm unclear on is SNS does when when GCM sends it NotRegistered for a registration id.

Does Amazon delete the SNS topic? If so, how do I know on my application server to remove my reference to it? If not, how am I expected to clean up my list of SNS topics assigned to a user?

like image 314
Joe Avatar asked Aug 15 '14 14:08

Joe


People also ask

Which AWS service is the best choice for publishing messages to subscribers?

Q: What is Amazon Simple Notification Service (Amazon SNS)? It provides developers with a highly scalable, flexible, and cost-effective capability to publish messages from an application and immediately deliver them to subscribers or other applications.

How do you delete an endpoint?

To delete an endpoint (console)Access the channel that the endpoint is associated with, as described in Viewing channel details. On the details page for the channel, under Origin endpoints choose the endpoint ID. On the Origin endpoint details page, choose Delete. On the Origin endpoint delete page, choose Delete.

How is fanout done in Amazon SNS?

The Fanout scenario is when a message published to an SNS topic is replicated and pushed to multiple endpoints, such as Kinesis Data Firehose delivery streams, Amazon SQS queues, HTTP(S) endpoints, and Lambda functions. This allows for parallel asynchronous processing.


1 Answers

Amazon SNS sets the endpoint to "Disabled". You can subscribe to EventEndpointCreated events to receive this notification.

From the Amazon SNS FAQ:

How does SNS Mobile Push handle token feedback from notification services?

SNS Mobile Push automatically handles token feedback services on your behalf, and exposes the feedback information via events published to a topic you may choose to consume. This approach reduces the operational burden of sending push notifications, and maximizes the speed and reliability with which your notifications are delivered. Push notifications services such as APNS and GCM provide feedback about tokens which may have expired or been replaced by new tokens. When a particular token is replaced by a new token, SNS automatically updates the associated endpoint, and notifies you via an event. When a particular token expires, perhaps because a user deleted your app, SNS marks the endpoint as disabled and notifies you via an event. You don’t strictly need to consume the feedback notifications in order to send push notifications with SNS, but may choose to do so based on your broader use case.

like image 181
Rohan Deshpande Avatar answered Oct 14 '22 09:10

Rohan Deshpande