The tale of two Azure Hubs
I hope you noticed the similarity of the article’s title to a famous novel named "The tale of two cities" by Charles Dickens. This novel is Dicken’s best-known work of historical fiction, with over 200 million copies sold and is regularly cited as the best-selling novel of all time. It was required reading in one of my English classes during high school.
The reason behind the name of this article is the fact that Azure has two hubs that can be used for capturing messages (events). Both Azure IoT Hub and Azure Event Hubs are cloud services that can receive telemetry (messages) and process and/or store that data for business insights. These services support the ingestion of large amounts of data with low latency and high reliability, but they are designed for different purposes.
IoT Hub was design for connecting of devices to the internet. Unlike Event Hubs, the communication can be bi-directional. This Cloud-to-Device communication opens the door way for many different things. The device can be updated with new configuration settings or perform actions upon request. Updating intelligent processing (machine learning) can be achieved when using an Azure IoT edge device. Last but not least, there is a framework for device provisioning, device identity, and transferring of data.
Event Hubs was designed as a big data streaming service capable of processing millions of messages per second. The partitioned consumer model can be used to scale out your streaming data. Big data analytics services of Azure including Databricks, Stream Analytics, ADLS, and HDInsight can read and process the data from the hub. Unlike IoT Hub, identity is done with shared access signatures and communication supports only two protocols.
Today’s article focuses on deploying and configuring the Azure Event Hub service. This service is less complex and will work fine for an IoT prototype. How can we accomplish this task?