1. Home
  2. Training Library
  3. Microsoft Azure
  4. Courses
  5. Configuring Serverless Computing on Azure

Using Azure Portal and Service Bus

The course is part of these learning paths

AZ-101 Exam Preparation: Microsoft Azure Integration and Security
course-steps 11 certification 4 lab-steps 5
Start course
Duration1h 20m


Course Overview

Learn Configuring Serverless Computing on Azure with this course. Allowing cloud engineers to leverage serverless technologies to deploy solutions is vital to any enterprise. In this course you will learn to do this without the hassle of maintaining actual servers or virtual machines. In addition, this course provides a true insight into the creation of a 'Function App'. This is an interesting feature because creating a basic Function App is actually deceptively easy. Develop your skills with this course by learning exactly how to create a basic Function App. 

We would recommend having an intermediate understanding of MS Azure along with knowledge of its principles and product offerings before starting, ensuring that you yield the maximum potential of the training content. This Azure training content is made up of 11 comprehensive lectures along with an overview and summary.

This course can also be found in the following Learning Paths:

Learning Objectives

  • Learn what serverless computing is and what it offers
  • You’ll learn how to create an Azure Function in the Azure Portal and how to manage Azure Function App settings
  • Learn how to create an automated workflow with Azure Logic Apps
  • Learn about Event Grid and how to use it to monitor for changes in an Azure subscription
  • Learn what Azure Service Bus is and how to use it

Intended Audience

  • IT professionals who are interested in earning Azure certification
  • IT professionals who need to deploy and configure serverless resources in Azure


  • Access to an Azure tenant to follow along with demos
  • Moderate understanding of Azure

Related Training Content


In the previous lesson, you learned that the Microsoft Azure service bus is a messaging service that allows you to send information between applications and services. In this demonstration, you'll see how to use service bus topics and subscriptions in a retail inventory scenario. What we're going to do is create a service bus topic and a couple different subscriptions to that topic using the Azure portal. We'll then add some topic filters via .NET code, and then we'll create a couple messages with different content. We'll send those messages to a few subscriptions and then verify that those messages arrived at their subscriptions. What I've done in the background to prepare for this demonstration is install the latest version of Visual Studio 2017 along with the .NET Core SDK. For this demonstration, we're going to leverage the service bus GitHub repository and the GitHub sample that's in that repository. So let's get started. The first thing we need to do is sign in to our Azure portal, which we've already done here, and we need to create a service bus namespace. The namespace essentially provides a unique scoping container. This namespace is referenced by an FQDN, or a fully qualified domain name. To create our service bus namespace, what I'm going to do is create it in the ServerlessComputing resource group. To get started, we're going to click Create a resource. 

From the marketplace we can browse to Integration and then select Service Bus from the list. The name that we give our namespace for service bus needs to be unique across the entire Azure landscape. So I'm going to give it a unique name. We have an option of a couple different pricing tiers here. If we click View full pricing details, we can see the difference between those. For this demonstration we're going to use the Standard pricing tier, and then we'll select it. We're going to deploy our service bus and our pay-as-you-go subscription, and we're going to do it in the ServerlessComputing resource group. What I'm going to do for location is deploy East US, which is where I deploy all of my resources, and then we can click Create. Now that our deployment has succeeded we need to obtain our management credentials. So let's browse over to our dashboard here. And refresh my resource group. So when I click on my service bus namespace, I'm taken to the overview page. Now what happens when a new namespace is created, it automatically generates a shared access signature rule that includes a pair of primary and secondary keys that used to grant full access over all aspects of this namespace. To obtain these management credentials, what I need to do is click on Share access policies under my service bus namespace. And then from here, we're going to see this initial policy that was set up, this Root Manage Shared Access Key. 

If we click on this policy we can see a primary and secondary key and a primary connection string and a secondary connection string. We need to copy the primary key and the primary connection string that we can use to access this as part of our demonstration here. So I'm going to open up Notepad here, and copy my primary connection string, and my primary key into it. We'll need this information later on. So now that I have my access information, essentially my credentials here, what I need to do is create a topic and the associated subscriptions. Now, to create a service bus topic what we do is go to the overview page here for our service bus namespace, and then select a new topic at the top. We need to give our topic a name so I'm just going to call it mytopic, and we can leave all this other information at the default. Click Create to create the topic. And now that the topic is created we need to create a couple different subscriptions. To do that, we scroll down here in our namespace to Topics, and then we can see our new topic that was created. After we click on our topic here we have an option to create a subscription. Now, I mentioned earlier we're using the GitHub sample repository to run this demonstration. The code in the sample repository requires specific naming conventions to work. So what we're going to do to make sure these work is to create three subscriptions called S1, S2, and S3. These are hard-coded into the sample repository.

 So instead of trying to reinvent the wheel that Microsoft already put out there, we're just going to use what they have to go through this demonstration. So what we're going to do is create our subscriptions here, and we'll call them S1, S2, and S3. So at this point, we have our service bus namespace deployed. We have our service bus topic deployed. And we have three subscriptions configured. With all these pieces deployed we can configure some filter rules on our subscriptions, and then test it by sending and receiving messages. What we're going to do is we're going to open up a command prompt. And we're going to clone the service bus GitHub repository. And to do that, we run the git clone command, and we refer to the repository we want to clone. So now that we have the repository cloned, we need to switch over to our directory called Basic Send Receive Tutorial with Filters. What this repository includes is an entire structure of files that are necessary for this demonstration. This demonstration is actually based off of one of Microsoft's own tutorials that leverages this GitHub repository. So we'll change over to our directory here, and then what we're going to do is build our environment using the .net build command. Now, what this is doing is setting up our environment so we can actually do the demonstration. So we can see here the build succeeds with some warnings just telling us there're some values included that are never used. That's fine. Again, this is just setting up the environment to perform the test. Now, what we're going to do is we're going to launch our demo application that's going to talk to our service bus. And we're going to run it using .NET. 

So let's switch over to the directory that we need to switch to. And now, to run the actual application and connect to our service bus namespace we're going to call the Basic Send Receive Tutorial with Filters DLL from our repository. But when we do that, we have to specify the connection string and shared access key that we collected earlier when we provisioned our environment. We also have to specify the name of our topic, which is called mytopic. So what I'm going to do is I'm going to copy a pretty long command in here. So what you see here is we're calling .net and we're loading the Basic Send Receive Tutorial with Filters DLL from the GitHub repository that we cloned from the sample repository that Microsoft provides. By calling this we're also specifying the connection string that we copied along with the shared access key name and the shared access key. We're also specifying our topic name. So this is going to allow the application to communicate with our service bus. So we'll go ahead and run this. And you can see here it's a pretty basic application here. Now, since we're going to be creating filters, the first step is to always remove any default filters. And it actually tells us right here in the demo. 

So what we'll do is we'll select option one to remove any default filters. And it tells us here that default filters have been removed. And then this is going to actually create a set of custom filters for this demonstration so we'll select option two, and you can see here the filters have been created. So what we're going to do now is select option four. And what this is going to do is send a slew of messages to our topic in service bus. You can see here it's sent one, two, three, four, five, six, seven, eight, sent 10 messages to our topic in service bus. And essentially, this is using a retail store example. Now, to confirm that those messages were sent to our topic, we could try to pull them back, we can receive them. And we do this by hitting the number five option. So let's select number five. And we can see one, two, three, four, five, six, seven, eight, nine, 10 messages matching the initial 10 that we sent have been received. So since we were able to retrieve all 10 of these messages, this confirms that all 10 were sent to our service bus. So essentially what we've done in this demonstration, is demonstrate how each of three different retail outlets, or stores I guess, were able to receive messages that were intended for them using subscriptions and filters. What we did was create a topic within our service bus that included three different subscriptions, S1, S2 and S3, which were essentially representing different stores. We added the rules and filters, and then we were able to send and receive those messages from the topic and each of those subscriptions.

About the Author


Tom is a 25+ year veteran of the IT industry, having worked in environments as large as 40k seats and as small as 50 seats. Throughout the course of a long an interesting career, he has built an in-depth skillset that spans numerous IT disciplines. Tom has designed and architected small, large, and global IT solutions.

In addition to the Cloud Platform and Infrastructure MCSE certification, Tom also carries several other Microsoft certifications. His ability to see things from a strategic perspective allows Tom to architect solutions that closely align with business needs.

In his spare time, Tom enjoys camping, fishing, and playing poker.