API to know Azure Notification Hubs limit left - azure

I need to know how to get limit which is left for Azure Notification Hub. Is there such function in Azure API? I haven't find anything about it in docs.

As far as I know, there are three tiers in Notification Hubs—free, basic, and standard. Base charge and quotas are applied at the namespace level. These three tiers have limits in the namespace. For more details, you can refer to the doc. To see the current namespace tier, simply GET on the namespace plan:
GET: https://management.core.windows.net/{subscription ID}/services/ServiceBus/Namespaces/{namespace name}/notificationhubplan

Related

Is there a limit on API keys (Subsriptions) in Azure API Management Consumption tier?

We're looking to use Azure API Management consumption tier to create an API gateway, but I've read somewhere there is a limit of 500 on the number of API keys you can create. But, I can't see any documentation on it, one way or another.
Does anyone know the truth of this?
Referring to this article, The maximum number of subscription (API Keys)per service instance is 500.
If you would like more than 500. The best approach would be to use premium tier or standard or basic . For non-consumption tiers don't have any artificial limit as such.

Cannot create topics in service bus

I created a service bus account with Basic tier and tried to create a Topic but I saw that it was not possible due to the Basic tier. So I deleted this service bus and created another one with the same name, but this time with the tier as Standard. Now when I try to create a topic I get the message:
SubCode=40000. Cannot operate on type Topic because the namespace 'XXXX' is using 'Basic' tier.
But it´s Standard as you can see on the image:
There are only two hard things in Computer Science: cache invalidation and naming things.
-- Phil Karlton
Service Bus is not an exception. Your best bet at this point is to contact Azure support directly or via Twitter.

Topics section missing from Azure Service Bus namespace on Standard Pricing Tier

I've got 2 Service Bus namespaces, both on the Standard Tier.
The older of the two only shows the Queues option and the option to create a Topic is disabled, however there are existing Topics in the namespace and these all work correctly.
The newer one which was created today has Topics enabled.
Both of them show as Standard Tier in the Portal:
Namespace missing Topics:
Namespace with Topics:
If I try to change the older one to Basic, it fails due to the existing Topics.
My theory is that this is a bug in the Portal and, while the underlying Azure infrastructure and the Scaling section of the portal know that this is a Standard Tier, that some part of it is not recognizing this, thus the missing Topics.
It should also be noted that if I generate an Automation Script, it wants to create this namespace as a Basic SKU but the other one as a Standard. It may be that at some point in the past (many years ago), this was a Basic tier.
So my question is, is there anything else I can check on the older namespace that may be incorrect that I can resolve or is this a bug in the Portal?
I just came into the same issue, I got a Service Bus resource from our Dev Ops team and it turned out that the topic feature is missing. The reason is that the pricing tier was basic.

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.
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.

Monitoring Azure Event Hub

I have been researching on Microsoft Azure Event Hubs. My goal is to figure out a way to provide automatic scalability. This is a experimental work and I am really only trying to know what can I do with Azure event hubs. I do not have access to the Azure platform to test test anything :( .
Well, so far, I found that through REST API and Service Bus Powershell I can add Throughput Units (to increase performance - I am relying on this: Scale Azure Service Bus through Powershell or API) and increase or decrease Event's Expiration time (which might influence capacity - https://msdn.microsoft.com/en-us/library/azure/dn790675.aspx).
The problem is that, presuming that the previous techniques work and I am able to scale event hubs' performance automatically, I still need a way to know when to trigger scalability mechanisms. To know when and how to trigger scalability, I need to work on some functions that rely upon the event hub's metrics (or a way to monitoring it). The problem is that I can't really find any metrics. The only thing that I find is this: https://azure.microsoft.com/en-us/documentation/articles/cloud-services-how-to-monitor/ - Which actually does not solve my problem because although it may present some interesting metrics, it does not serve the purposes of my "application" (which will come if I can prove that I can successfully scale Azure automatically); and this Azure service bus statistics/Monitoring - which's links are not working.
Surely I can find more information about Service Bus Explorer, and surely it may provide some interesting insights over the event hub metrics, I am just wondering if there is something like this: https://github.com/HBOCodeLabs/incubator-storm/blob/master/STORM-UI-REST-API.md that allow me to access some kind of metrics, rather than creating my own metrics
Thanks in advance
Best regards
You can retrieve metrics about Event Hubs (an Event Hub is a Service Bus Entity) using the Service Bus Entity Metrics REST APIs(https://msdn.microsoft.com/library/azure/dn163589.aspx). Using this you can retrieve the same metrics displayed in the portal such as:
Number of incoming messages
Incoming throughput
Outgoing throughput
These should help you determine when you need to scale your application up or down.
This video is useful for getting started https://channel9.msdn.com/Blogs/Subscribe/Service-Bus-Namespace-Management-and-Analytics
If 3rd party services are an option, look into CloudMonix # http://cloudmonix.com
It can monitor Event Hubs (among gazillion other Azure-related things) and execute Azure Automation runbooks (among gazillion other actions) as a reaction to load conditions/throughout of a whole hub or individual partitions and optionally based on any other metrics in your environment.
Your Azure Automation runbooks could have the logic to execute increases in your EH's throughout, etc.
Disclaimer: I'm affiliated with the product.
HTH
Service Bus Explorer is great. I actually use this.
ServiceBus Explorer

Resources