Book Image

Learning Azure Functions

By : Mitesh Soni, Manisha Yadav
Book Image

Learning Azure Functions

By: Mitesh Soni, Manisha Yadav

Overview of this book

Functions help you easily run small pieces of code in cloud with Azure functions without worrying about a whole application or the infrastructure to run it. With Azure functions, you can use triggers to execute your code and bindings to simplify the input and output of your code. This book will start with the basics of Azure Functions. You will learn the steps to set up the environment and the tools that we will be using in the further chapters. Once you have a better understanding of this, we will be creating our first hello world function app. Later you will be introduced to triggers, how they are used to activate a function, and how binding can be used to output results of a function.You will also explore the steps to create an assembly with complex functionality that can be used by functions. Next, this book will teach you to scale your functions and use them to process data, integrate systems, and build simple APIs and microservices. Finally, this book will cover some diagnostic techniques with Azure App services and best practices of working with Azure Functions. By the end of this book, you will be well-versed with the techniques of scaling your Azure functions and making the most of serverless architecture.
Table of Contents (17 chapters)
Title Page
About the Authors
About the Reviewers
Customer Feedback

Types of Event Hubs

Event Hubs in Azure is a scalable data stream platform.

Event Hubs

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:

  1. Create an Event Hub in Azure.
  2. Log in to the Azure Portal. Click on the plus + sign, then on Internet of Things, and finally on Event Hubs as shown in the following screenshot:
  1. Provide the required details and click on Create:
  1. Bind the Azure Function with the Event Hub.


  1. In the previous chapter, we created the Azure App. Now, create the Azure Function with a timer trigger, as shown in the following screenshot:
  1. Provide the name and click on the Create button...