Search code examples
node.jsazureazure-notificationhubazure-node-sdk

Azure Notification Hub for NodeJs (Registration update and replace the tags)


Is it possible to take all of the registration count from the notification hub service using nodejs?

function from the nodejs as follow :

listRegistrationsByTag(tag, optionsopt, callback)

listRegistrations(optionsopt, callback)

but it can only list out maximum of 100 accounts. How would we know the maximum number of accounts via these function. For example, I have about 100,000 users and I wish to know that how many registration has been added to the notification hubs by tags and also the total number of all registrations. For the two functions above, it have options to take number of registration and skipping numbers but still missing the total numbers by tags or by this service.

You can refer to the documentation here

Please help to advise on this.


Solution

  • As I known, there is no limits for the number of registrations for Azure Notification Hub after I checked the offical document about limits, quotas and constraints. And there were some similar & answered SO threads that you can refer to, please see Azure Notification Hub - Limit on registrations, Getting QuotaExceededException - What are the operation quota limitations for Azure Notification Hubs?, and Azure Notification Hub quota limits. So I think it's not related to limitation and quotas.

    The two functions above wrap the REST APIs Read All Registrations with a Tag & Read All Registrations. The argument options is as the $top & $skip query strings for these REST APIs. I searched the source code of Notification Hub SDK for Node, then I didn't find any code for limiting the number of registrations.

    For being sure what the issue is caused by, I suggest you can try the REST APIs to read all registration to compare with using SDK.

    Any update, please feel free to let me know.