IoT Hub vs Event Hub, what are the use cases?
March 01 20162 mins read azure iot event hub iot hubIntroduction
Talking about IoT, the Microsoft Azure IoT suite provide 2 really cool solutions, the "Event Hub" and the "IoT Hub". We will the big picture in order to understand typical scenarios.
Event Hub vs IoT Hub
Technical differences
Globally, those 2 services are similar, made for large scale data processing, low latency but let's compare them :
_ | IoT Hub | Event Hub |
---|---|---|
Communication | Bi-directional | Uni-directional |
Protocols | AMQP, WebSocket, HTTP/1, MQTT | AMQP, WebSocket, HTTP/1 |
Security | Device-level identity | Shared access strategy |
Dashboards | Event logs for the devices connectivity, authentifications & communications, accurate alerts for failures. | Only charts for the Hub |
Scaling | Millions simultaneous devices connexions | up to 5000 AMQP connexions |
Use cases
In fact, until now , the Event Hub which was made for processing " events telemetry ", was the right choice for a communication Device -> cloud scenario. Now the IoT became a big thing, the IoT was created to replace the Event Hub in those scenarios (thanks to the bi-directional canal) and the Event Hub is now the big brother made to manage events, in a large scale scenario.
IoT Hub exemple : An alert, made by a device (after some data analysis ) or simply displaying real time metrics on a dashboard.
Conclusion
The IoT Hub is a complexe service made to be the entry point of communication from devices to the Cloud, and the Event Hub, a really simple tool used in most of the case for accessing datas in a dashboard ( Cloud -> dashboard).
Creating Hubs on the Azure platform
IoT Hub
For the IoT hub, I will suggest you to read my colleague's article right here ( In French ) Azure IoT Hub, provisioning et configuration by Michaël Fery.
Event Hub
Let's create an Event Hub ! First, connect on the classic Azure portal, then in the section "Service Bus" click on "create", complete the form, let the type on "Messaging" and don't try to change it to "Notification Hub"( which is the coice for Push Notification )
Once it's created, continue and create an "Event Hub" :
Good, now you can manage your shared access strategy in the options like following :
Voila, the connection string is accessible from the Service Bus directly.