FCM topic limits and expiration/invalidation of old unused topics?










0















I have been using FCM topics for a while now, but the documentation is very limited and most searches leads to the same pages, so I am asking here, in hope someone has enough experience on the subject to answer my questions.



I am wondering if there is a limit to how many topics are allowed and what happens to topics that are no longer in use? I mean, when will a topic be invalid?



I have had issues where unsubscribing from a topic didn't seem to work, even if I get a positive response back or other times the notifications have been sent twice.



To get around this, I am currently making a new command, but unlike before, every time the command is run, I will subscribe tokens to a unique topic, send the notification, unsubscribe token and then that topic will never be used again. This is a way for me to have better control over which users gets subscribed to certain topics, as FCM offers no help with this, that I am aware of.



So here my question is, should I unsubscribe all the tokens again afterwards, letting FCM know that it is no longer in use, or would that be pointless to do? (In case they have some sort of clean up in place)



Hope someone can guide me in the right direction.










share|improve this question




























    0















    I have been using FCM topics for a while now, but the documentation is very limited and most searches leads to the same pages, so I am asking here, in hope someone has enough experience on the subject to answer my questions.



    I am wondering if there is a limit to how many topics are allowed and what happens to topics that are no longer in use? I mean, when will a topic be invalid?



    I have had issues where unsubscribing from a topic didn't seem to work, even if I get a positive response back or other times the notifications have been sent twice.



    To get around this, I am currently making a new command, but unlike before, every time the command is run, I will subscribe tokens to a unique topic, send the notification, unsubscribe token and then that topic will never be used again. This is a way for me to have better control over which users gets subscribed to certain topics, as FCM offers no help with this, that I am aware of.



    So here my question is, should I unsubscribe all the tokens again afterwards, letting FCM know that it is no longer in use, or would that be pointless to do? (In case they have some sort of clean up in place)



    Hope someone can guide me in the right direction.










    share|improve this question


























      0












      0








      0








      I have been using FCM topics for a while now, but the documentation is very limited and most searches leads to the same pages, so I am asking here, in hope someone has enough experience on the subject to answer my questions.



      I am wondering if there is a limit to how many topics are allowed and what happens to topics that are no longer in use? I mean, when will a topic be invalid?



      I have had issues where unsubscribing from a topic didn't seem to work, even if I get a positive response back or other times the notifications have been sent twice.



      To get around this, I am currently making a new command, but unlike before, every time the command is run, I will subscribe tokens to a unique topic, send the notification, unsubscribe token and then that topic will never be used again. This is a way for me to have better control over which users gets subscribed to certain topics, as FCM offers no help with this, that I am aware of.



      So here my question is, should I unsubscribe all the tokens again afterwards, letting FCM know that it is no longer in use, or would that be pointless to do? (In case they have some sort of clean up in place)



      Hope someone can guide me in the right direction.










      share|improve this question
















      I have been using FCM topics for a while now, but the documentation is very limited and most searches leads to the same pages, so I am asking here, in hope someone has enough experience on the subject to answer my questions.



      I am wondering if there is a limit to how many topics are allowed and what happens to topics that are no longer in use? I mean, when will a topic be invalid?



      I have had issues where unsubscribing from a topic didn't seem to work, even if I get a positive response back or other times the notifications have been sent twice.



      To get around this, I am currently making a new command, but unlike before, every time the command is run, I will subscribe tokens to a unique topic, send the notification, unsubscribe token and then that topic will never be used again. This is a way for me to have better control over which users gets subscribed to certain topics, as FCM offers no help with this, that I am aware of.



      So here my question is, should I unsubscribe all the tokens again afterwards, letting FCM know that it is no longer in use, or would that be pointless to do? (In case they have some sort of clean up in place)



      Hope someone can guide me in the right direction.







      firebase push-notification firebase-cloud-messaging push






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 14 '18 at 8:49







      SeverinDK

















      asked Nov 13 '18 at 14:57









      SeverinDKSeverinDK

      1319




      1319






















          1 Answer
          1






          active

          oldest

          votes


















          1















          I am wondering if there is a limit to how many topics are allowed...




          No limit.




          ...what happens to topics that are no longer in use? I mean, when will a topic be invalid?




          A topic is created when there is at least 1 subscriber and it also gets automatically deleted when there are no more subscribers.




          To get around this, I am currently making a new command, but unlike before, every time the command is run, I will subscribe tokens to a unique topic, send the notification, unsubscribe token and then that topic will never be used again. This is a way for me to have better control over which users gets subscribed to certain topics, as FCM offers no help with this, that I am aware of.




          This use case doesn't seem to be wrong per se. It's just a bit unconventional (although I'm pretty sure I suggested something like this before).



          Currently, with FCM v1, the registration_ids parameter (used to send to multiple token -- 1000 each request) is no longer advised. FCM team seems to be moving towards using topics for sending to multiple tokens. With that said, IMHO, I think the use case is valid.






          share|improve this answer


















          • 1





            Thank you for clearing that up. I already put this in place and it works, just wanted to confirm what I was doing wasn't completely wrong.

            – SeverinDK
            Nov 14 '18 at 12:57











          • Have you had any issues where not all subscribers get the notification? I I subscribe a bunch, send the notification and unsubscribe again straight away, but I have noticed that sometimes not everyone gets the notification. I assumed that Firebase had something in place to see if subscriptions were being added and then waited for those to be done before sending the push, but that does not seem to be the case. Guess I will just have to wait 5-10 secs and then send.

            – SeverinDK
            Nov 28 '18 at 12:06











          • There have been instances that user's don't receive messages. But more often than not, it's a restriction with the device that's preventing the delivery. So I can't say for sure that this is on FCM's end.

            – AL.
            Nov 29 '18 at 4:16










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53283779%2ffcm-topic-limits-and-expiration-invalidation-of-old-unused-topics%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1















          I am wondering if there is a limit to how many topics are allowed...




          No limit.




          ...what happens to topics that are no longer in use? I mean, when will a topic be invalid?




          A topic is created when there is at least 1 subscriber and it also gets automatically deleted when there are no more subscribers.




          To get around this, I am currently making a new command, but unlike before, every time the command is run, I will subscribe tokens to a unique topic, send the notification, unsubscribe token and then that topic will never be used again. This is a way for me to have better control over which users gets subscribed to certain topics, as FCM offers no help with this, that I am aware of.




          This use case doesn't seem to be wrong per se. It's just a bit unconventional (although I'm pretty sure I suggested something like this before).



          Currently, with FCM v1, the registration_ids parameter (used to send to multiple token -- 1000 each request) is no longer advised. FCM team seems to be moving towards using topics for sending to multiple tokens. With that said, IMHO, I think the use case is valid.






          share|improve this answer


















          • 1





            Thank you for clearing that up. I already put this in place and it works, just wanted to confirm what I was doing wasn't completely wrong.

            – SeverinDK
            Nov 14 '18 at 12:57











          • Have you had any issues where not all subscribers get the notification? I I subscribe a bunch, send the notification and unsubscribe again straight away, but I have noticed that sometimes not everyone gets the notification. I assumed that Firebase had something in place to see if subscriptions were being added and then waited for those to be done before sending the push, but that does not seem to be the case. Guess I will just have to wait 5-10 secs and then send.

            – SeverinDK
            Nov 28 '18 at 12:06











          • There have been instances that user's don't receive messages. But more often than not, it's a restriction with the device that's preventing the delivery. So I can't say for sure that this is on FCM's end.

            – AL.
            Nov 29 '18 at 4:16















          1















          I am wondering if there is a limit to how many topics are allowed...




          No limit.




          ...what happens to topics that are no longer in use? I mean, when will a topic be invalid?




          A topic is created when there is at least 1 subscriber and it also gets automatically deleted when there are no more subscribers.




          To get around this, I am currently making a new command, but unlike before, every time the command is run, I will subscribe tokens to a unique topic, send the notification, unsubscribe token and then that topic will never be used again. This is a way for me to have better control over which users gets subscribed to certain topics, as FCM offers no help with this, that I am aware of.




          This use case doesn't seem to be wrong per se. It's just a bit unconventional (although I'm pretty sure I suggested something like this before).



          Currently, with FCM v1, the registration_ids parameter (used to send to multiple token -- 1000 each request) is no longer advised. FCM team seems to be moving towards using topics for sending to multiple tokens. With that said, IMHO, I think the use case is valid.






          share|improve this answer


















          • 1





            Thank you for clearing that up. I already put this in place and it works, just wanted to confirm what I was doing wasn't completely wrong.

            – SeverinDK
            Nov 14 '18 at 12:57











          • Have you had any issues where not all subscribers get the notification? I I subscribe a bunch, send the notification and unsubscribe again straight away, but I have noticed that sometimes not everyone gets the notification. I assumed that Firebase had something in place to see if subscriptions were being added and then waited for those to be done before sending the push, but that does not seem to be the case. Guess I will just have to wait 5-10 secs and then send.

            – SeverinDK
            Nov 28 '18 at 12:06











          • There have been instances that user's don't receive messages. But more often than not, it's a restriction with the device that's preventing the delivery. So I can't say for sure that this is on FCM's end.

            – AL.
            Nov 29 '18 at 4:16













          1












          1








          1








          I am wondering if there is a limit to how many topics are allowed...




          No limit.




          ...what happens to topics that are no longer in use? I mean, when will a topic be invalid?




          A topic is created when there is at least 1 subscriber and it also gets automatically deleted when there are no more subscribers.




          To get around this, I am currently making a new command, but unlike before, every time the command is run, I will subscribe tokens to a unique topic, send the notification, unsubscribe token and then that topic will never be used again. This is a way for me to have better control over which users gets subscribed to certain topics, as FCM offers no help with this, that I am aware of.




          This use case doesn't seem to be wrong per se. It's just a bit unconventional (although I'm pretty sure I suggested something like this before).



          Currently, with FCM v1, the registration_ids parameter (used to send to multiple token -- 1000 each request) is no longer advised. FCM team seems to be moving towards using topics for sending to multiple tokens. With that said, IMHO, I think the use case is valid.






          share|improve this answer














          I am wondering if there is a limit to how many topics are allowed...




          No limit.




          ...what happens to topics that are no longer in use? I mean, when will a topic be invalid?




          A topic is created when there is at least 1 subscriber and it also gets automatically deleted when there are no more subscribers.




          To get around this, I am currently making a new command, but unlike before, every time the command is run, I will subscribe tokens to a unique topic, send the notification, unsubscribe token and then that topic will never be used again. This is a way for me to have better control over which users gets subscribed to certain topics, as FCM offers no help with this, that I am aware of.




          This use case doesn't seem to be wrong per se. It's just a bit unconventional (although I'm pretty sure I suggested something like this before).



          Currently, with FCM v1, the registration_ids parameter (used to send to multiple token -- 1000 each request) is no longer advised. FCM team seems to be moving towards using topics for sending to multiple tokens. With that said, IMHO, I think the use case is valid.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 14 '18 at 12:49









          AL.AL.

          23.6k753185




          23.6k753185







          • 1





            Thank you for clearing that up. I already put this in place and it works, just wanted to confirm what I was doing wasn't completely wrong.

            – SeverinDK
            Nov 14 '18 at 12:57











          • Have you had any issues where not all subscribers get the notification? I I subscribe a bunch, send the notification and unsubscribe again straight away, but I have noticed that sometimes not everyone gets the notification. I assumed that Firebase had something in place to see if subscriptions were being added and then waited for those to be done before sending the push, but that does not seem to be the case. Guess I will just have to wait 5-10 secs and then send.

            – SeverinDK
            Nov 28 '18 at 12:06











          • There have been instances that user's don't receive messages. But more often than not, it's a restriction with the device that's preventing the delivery. So I can't say for sure that this is on FCM's end.

            – AL.
            Nov 29 '18 at 4:16












          • 1





            Thank you for clearing that up. I already put this in place and it works, just wanted to confirm what I was doing wasn't completely wrong.

            – SeverinDK
            Nov 14 '18 at 12:57











          • Have you had any issues where not all subscribers get the notification? I I subscribe a bunch, send the notification and unsubscribe again straight away, but I have noticed that sometimes not everyone gets the notification. I assumed that Firebase had something in place to see if subscriptions were being added and then waited for those to be done before sending the push, but that does not seem to be the case. Guess I will just have to wait 5-10 secs and then send.

            – SeverinDK
            Nov 28 '18 at 12:06











          • There have been instances that user's don't receive messages. But more often than not, it's a restriction with the device that's preventing the delivery. So I can't say for sure that this is on FCM's end.

            – AL.
            Nov 29 '18 at 4:16







          1




          1





          Thank you for clearing that up. I already put this in place and it works, just wanted to confirm what I was doing wasn't completely wrong.

          – SeverinDK
          Nov 14 '18 at 12:57





          Thank you for clearing that up. I already put this in place and it works, just wanted to confirm what I was doing wasn't completely wrong.

          – SeverinDK
          Nov 14 '18 at 12:57













          Have you had any issues where not all subscribers get the notification? I I subscribe a bunch, send the notification and unsubscribe again straight away, but I have noticed that sometimes not everyone gets the notification. I assumed that Firebase had something in place to see if subscriptions were being added and then waited for those to be done before sending the push, but that does not seem to be the case. Guess I will just have to wait 5-10 secs and then send.

          – SeverinDK
          Nov 28 '18 at 12:06





          Have you had any issues where not all subscribers get the notification? I I subscribe a bunch, send the notification and unsubscribe again straight away, but I have noticed that sometimes not everyone gets the notification. I assumed that Firebase had something in place to see if subscriptions were being added and then waited for those to be done before sending the push, but that does not seem to be the case. Guess I will just have to wait 5-10 secs and then send.

          – SeverinDK
          Nov 28 '18 at 12:06













          There have been instances that user's don't receive messages. But more often than not, it's a restriction with the device that's preventing the delivery. So I can't say for sure that this is on FCM's end.

          – AL.
          Nov 29 '18 at 4:16





          There have been instances that user's don't receive messages. But more often than not, it's a restriction with the device that's preventing the delivery. So I can't say for sure that this is on FCM's end.

          – AL.
          Nov 29 '18 at 4:16

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53283779%2ffcm-topic-limits-and-expiration-invalidation-of-old-unused-topics%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          Barbados

          How to read a connectionString WITH PROVIDER in .NET Core?

          Node.js Script on GitHub Pages or Amazon S3