• About

Information Dynamics

Information Dynamics

Tag Archives: Azure Function

Azure Function and Queue Storage

27 Saturday Nov 2021

Posted by GIRISH SRINIVASA in Uncategorized

≈ Leave a comment

Tags

Azure Function

In this article we will implement a Azure Function utilizing Azure Queue storage that will post a message to the queue. The sample code for this article can be obtained from GitHub

For development purposes using Visual Studio IDE ensure that Azure Storage emulator is installed and be obtained from here . Once installed the executable can be located in the following path:

Starting the emulator can be done through command window:

Choosing Show Storage Emulator UI option will bring up the following and lists the commands that can be used

The Storage Emulator uses a local Microsoft SQL Server 2012 Express LocalDB instance to emulate Azure storage services. In the example scenario we will build a Azure Function to post a message to the Queue Storage. The data model we will use in the sample is as per below:

A snippet of the code to post a message to the queue is as below:

Testing and Validation:

Now that we have implemented “ApplyForLoan” function let us test and validate to ensure that the request message is successfully posted to the “loan Application” queue and explore the contents of the message in queue using Microsoft Azure Storage Explorer. Details on how to inspect the message posted to the queue is detailed later part of the article. List of Function names displayed in console

Using Postman invoke the ApplyForLoan function

Code debug view
If the message is successfully posted to the Queue then it can be viewed from Azure Storage Explorer
Tool(s) to explore Azure Storage Emulator Resources:

There are two options available for exploring the items in the Azure Storage Emulator.

  1. From within Visual Studio choose the Cloud Explorer

This will list Blob Containers, Queues, Tables attached to the storage account

2. The second option is Azure Storage Explorer and can be downloaded from here once installed connect to the Local storage by clicking on Add Connection

Choose Next and then Connect

Once successfully connected the view will be refreshed with the newly added connection

Note: Issues with Azure Storage Explorer

If there is an error in as shown below:

Then ensure that Storage Emulator is started

Then restart Azure Storage Explorer the error should now disappear

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • November 2021
  • August 2021
  • July 2021
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • March 2019
  • September 2018
  • February 2018
  • January 2018
  • December 2017
  • January 2017
  • August 2016
  • January 2016
  • November 2015
  • October 2015
  • September 2015
  • November 2014
  • October 2014
  • September 2014
  • July 2014

Categories

  • ADCS
  • ADFS
  • ADFS 4.0
  • ASP.NET Core
  • Azure
  • Azure AD
  • Azure AD DS
  • Azure B2C
  • CRM 2011
  • CRM2013
  • CRM2015
  • CRM2016
  • Docker
  • Dynamics 365
  • Dynamics 365 CE Online
  • Dynamics 365 Portals
  • Dynamics CE 9
  • Knockout and TypeScript
  • OAuth2.0/OpenIDConnect
  • Power Platform
  • PowerApps
  • PowerShell
  • SharePoint 2019
  • Spkl
  • Uncategorized
  • WebAPI
  • Windows Server 2012
  • Windows Server 2016

Meta

  • Register
  • Log in

Blog at WordPress.com.

  • Follow Following
    • Information Dynamics
    • Already have a WordPress.com account? Log in now.
    • Information Dynamics
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...