1
votes

I need to send messages from few thousands of devices to central hub and be able to get live stream of messages for specific device from that hub. So far, Azure Event Hubs seems to the cheapest option in terms of messages count. Event Hub namespace allows to create distinct event hubs in it.

  1. Can I create few thousands of such hubs, one per device?
  2. Is it a good idea? What could be potential drawbacks?
  3. How price is calculated - per namespace or per event hub? (I think per namespace, but I cannot find this info)
  4. If per namespace, does it mean that purchased throughput units are shared among all event hubs? If yes, will single event hub namespace with 1000 event hubs will consume same amount of resources as single event hub namespace with single event hub but which receives messages from 1000 devices?
2

2 Answers

6
votes

No, you are limited to 10 Event Hubs per namespace.

Event Hub per device is not the recommended usage. Usual scenario is to put all messages from all devices to the same Event Hub, and then you can separate them again in the processing side. This will scale much better.

Event Hubs quotas

0
votes

Azure Event hub is an event ingestion service to which you can send events from the event publishers.The events will be available in the event hub partitions to which different consumer groups subscribe.The partitions can be designed to accept only specific kind of events.

You can also create multiple event hubs within an event hub namespace. You can create a maximum of 10 event hubs per Event hub namespace, 32 event hub partitions within an event hub and 20 consumer groups per event hub. So, You can use event hub partitions to separate the events from the event publishers and consume the events in the processing side very easily.

The pricing is at event hub level and not at namespace level. Based on the tier you choose you will be provided with variable features like:

Basic tier: You can have only 1 consumer group

Standard and Dedicated tier: You can create up to 20 consumer groups.

For example, If you choose Basic or Standard tier and region as East US, You will be charged $0.028 per million events for ingress and $0.015 per unit/hour for throughput.

If you choose Dedicated tier, you will be charged 6.849$ per hour which includes the unlimited ingress and throughput charges, but the minimum hours charged are 4hrs. The main advantage of using dedicated tier is the message retention period is 7 days whereas in basic and standard tier it is just 1 day, and the message size is up to 1 MB whereas in basic and standard tier it is just 256 KB. Refer https://azure.microsoft.com/en-in/pricing/details/event-hubs/.