Notification Hub - 90 days Time to Live Issue RRS feed

  • Question

  • Hi All,

    I have a question around 90 days TTL for Notification Hub (NH).


    1. I register a Device in NH thru’ backend server. (Installation Model)
    2. I want this device to live forever as long as the App is not un-installed & receive all notifications sent from the Backend server.
    3. I just wanted to see how this behaves once the registration crosses the Expiry date.
      1. Created a Notification Hub for which TTL is set to 1 (against the default 90)
      2. I Used ServiceBus Explorer to change 90 to 1
      3. Registered a Windows App On Day 1.
      4. Expiry date was exactly 24 hrs from the registered time. (Tracking this in ServiceBus Explorer)
      5. Sent few Dummy Badge count / Tile to test the registration – Its successfully received at the App.
      6. On Day 2 after the crossing the Expiry date, I re-sent few test notifications.
      7. Still my App receives all the test notifications sent.
      8. I was not expecting it – My assumption was, the device should not receive notification as the registration is already expired.
      9. In the worst case: An app might not be opened for more than 90 days.

    In that case, what this TTL is all about??

    Why does some of the link (StackOverflow) says I have to re-register. Pls give your comments.

    Friday, December 18, 2015 6:21 AM

All replies

  • Hi Bewin,

    TTL is indeed the active time for a registration/installation. When TTL is set customarily, our service does lazy updates on our end so we don't active go and delete these registrations/installations. We ask for re-registrations on app start up because token from push notification services gets refreshed periodically, and re-registration guarantees we are working with the latest token. Please let me know if you have any other questions.


    • Proposed as answer by Mimi Xu Thursday, December 31, 2015 8:09 PM
    Thursday, December 31, 2015 8:07 PM
  • Hi Mimi, thanks for your answer to Bewin. I have a question about what you said - in our app we use a 'app->backend->Azure' model where the app sends the device token to our own backend, and that backend sends the token to Azure.

    Our app is caching the device token and only sending it to the backend when it's changed. Hence, our backend cannot inform Azure each time the app is started with the same token. Additionally, we would like to send push notifications even to devices where the user has not opened the app for more than 90 days. We prefer not to change our app to send the token on every launch in order to reduce overhead for our users and the backend.

    Is there a way around the TTL? Or must we resort to manually refreshing all the [millions of] tokens every once in a while? The documentation here says "2 years?" for the expirationTime. Should that actually be 90 days?


    Sunday, January 3, 2016 3:44 PM