Event Hubs in Azure is a scalable data stream platform.
Event Hubs are used to control traffic and capture events coming from mobile applications or web farms.
We can bind an Event Hub with the Azure Function as an trigger or output binding.
We will create a Azure Function with a timer trigger and bind it with the Event Hub (output binding). Whenever a timer trigger is run in the Azure Function, an output event will be sent to the Event Hub.
The following are the steps to create an Event Hub and Azure Function:
- Create an Event Hub in Azure.
- Log in to the Azure Portal. Click on the plus
+
sign, then onInternet of Things
, and finally onEvent Hubs
as shown in the following screenshot:
- Provide the required details and click on
Create
:
- Bind the Azure Function with the Event Hub.
- In the previous chapter, we created the Azure App. Now, create the Azure Function with a timer trigger, as shown in the following screenshot:
- Provide the name and click on the
Create
button...