Introduction
These days, Serverless computing is one of the key terms in the Cloud. This is a PaaS (Platform as a Service). It allows us to deploy and manage individual code functions without a need to deploy and manage on the individual Virtual Machine (VM). Azure Functions is a serverless compute service which runs our code on demand without needing to host it on the server and managing infrastructure. Azure Function allows us to write code in various languages, such as C#, F#, Node.js, Java, or PHP. It can be trigger from a variety of events such as HTTPTrigger, TimerTrigger, QueueTrigger etc. In my previous article, we learned about creating Azure function and look at HTTP triggered function and function created using the Azure portal. In this article, we will learn about Queue storage triggered Azure function.
Azure queue storage provides messaging between application components. It helps the application component to be decoupled and scale independently. It delivers asynchronous messaging for communication between application components. It can be stored large numbers of messages that can be accessed from anywhere over HTTP or HTTPS via authenticated call. The single message size is up to 64kb and queue contains a large number of messages up to a total capacity of the storage account.
In my previous article, I had shown how to create function app. When we create function app, it automatically deployed, and we can create functions under the function app.

Now, expand the function app and click the "+" button. If it is the first function under the function app, select "In-portal" and click "Continue".
Alternatively, you can also create a function using editors, such as Visual Studio or Azure CLI.

Now select "More templates" then click "Finish and view templates".

Search field type "Queue" and select "Azure Queue Storage trigger" template.

This template required "Microsoft.Azure.WebJobs.Extensions.Storage" extensions. If it is not installed, install the extension and click "Continue" after finish extension installation.


Now, fill up the following fields shown in the image. We need to fill the Name, Queue name, and Storage account connection information and click on the "Create" button.

Once the function is created, you can view/edit function information such message parameter name, queue name, etc. Also, you can see the account name and key under the Documentation tab.

Now, the function is ready, and is triggered when a new message is available in the Queue named "testqueue". To test our function, we can either use Microsoft Azure Storage Explorer tool or create own C# code.
Azure Storage Explorer is a tool that helps us to easily work with Azure storage data on different platform such as windows, macOS, and Linux. We can connect to our subscription and manipulate our queues, files, tables, and blobs using this tool. Additionally, we can also manipulate Azure Cosmos DB Storage and Azure Data Lake Storage using this tool.
After Azure Storage Explorer tool has installed successfully, launch this tool and click on "Connection" icon on the left, select "Use a storage account name and key" option, and click "Next".







Anjali SharmaPosted Jun 16, 2019, 12:52 PM
How function get to know that new message is arrived on the queue.
Anjali SharmaPosted Jun 16, 2019, 12:51 PM
I have one query...