-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create new topic, add subscribers to a topic #208
Comments
Hi @chirag200666, |
Hi @eladnava , |
After reading more I found :
https://developers.google.com/instance-id/reference/server My Approach : I have created a Subscription model (Subscription.js file) similar to that of Sender. Which has two functions, first one to create a subscription which takes a token or a list of tokens & a topic. The second function takes a list of tokens and a topic to be unsubscribed. I had a question: Should I implement the retry strategy we have in the Sender.js to the Subscription.js or it is not required. |
Nice! Could you make a PR with your suggested addition, so we can continue the discussion there? That will allow us to talk about concrete code, which is often much easier than talking about concepts 😄 I am not sure about the name, Subscription. If this functionality is only used for topics, maybe it should be called something more explicit, like TopicSubscriber? The retry strategy we currently have in the Sender should actually be fixed to respect the Retry-After header we might get from GCM (see #94). I think it would be a good idea for the topic subscription functionality to have retrying (and backoff) logic, too, but maybe we could extract that particular logic and reuse it in both the Sender and your new abstraction. |
I did an amateurish PR, want your inputs. |
This is a feature request. It will be very useful to have the functionalities in the node-gcm packages as many people would want to use them :
The text was updated successfully, but these errors were encountered: