Azure

Routing Blob Storage Events Using Azure Event Grid

This article is part of the Azure Event Grid Series. In this article series, we focus on the process of routing the blob storage event using the Azure Event Grid. In the previous article, we learnt about Azure Event Grid and learnt in step-by-step process to enable the event grid resource provider. This article marks the beginning of our goal on routing the blob storage event through Azure Event Grid. Here, we will specifically focus upon creating the message endpoint.  

Azure Event Grid 

Azure Event Grid makes it possible to send the event data from a particular source to handlers. Basically, the Azure Event Grid helps to connect application to numerous other services. As the name says, the Azure Event Grid is a feature enabled by Azure which makes it possible for event-based architecture while building applications. Through the Azure Event Grid, all the incoming events such as resource groups and blob storage are supported. Furthermore, with the custom topics developer’s own events too are supported by the Azure Event Grid. Simply select the Azure Resource to subscribe to and all then we require to do is connect Webhook endpoint or the event handler to the event. Filters can be accessed in order to route certain events to various endpoints, multicast to the multiple endpoints making sure all the events are properly delivered. 

Pre-requisites

  1. Read the article, Azure Event Grid and follow up the process to enable the event grid resource provider.  
  2. Follow the article, Azure Storage Account and create an Azure Storage Account.  

Now, let us go ahead and learn the process of creating the message endpoint.  

Step 1 

In order to subscribe to events for the Blob Storage, we first need to have endpoint for the event message. For this, let us first deploy our solution to our Azure Subscription. We have a Microsoft Template ready. Just Click this link.  

Step 2 

Now, we are taken to the Custom Deployment page where we can deploy from the custom template.  

Here, fill in the Subscription you are going to use and select the Resource group. If you don’t have one, create one.  

Step 3 

Now, select the Region to setup your instance. Name your Site and Hosting Plan. Select the Sku and GitHub Repo as I’ve shown here with the branch name and location.  

Once, it is all filled, click on Review + Create.  

Step 4 

Now, the validation is run. 

Once, it is successful, we’ll now have the option to Create the service.  

As we click on the Create button, deployment is initialized.  

Step 5 

We are updated with the progress in the deployment process.  

Once, the deployment process is successfully complete, we are provided with the link to access the resource group through “Go to resource group”. 

Step 6 

Here, we can see our site and hosting plan running.  

As we select our web app, we can see all the details.  

Data is visualized for Http, Data In and Out along with any requests and its respective response time.  

Also, we now have the Url to access our web app.  

Step 7 

Now, as I clicked my webapp URL, we can see it is setup with the Azure Event Grid Viewer.  

With this, we have successfully, created message endpoint to route our blob storage through Azure Event Grid. Currently, we can see there aren’t any events posted yet. In the upcoming articles, we’ll work on it.  

Conclusion 

Thus, in this article, we learnt to create the message endpoint before subscribing to the events for the blob storage. The endpoint we create here is based upon the event data. We went through a step-by-step process to deploy our solution from GitHub to our Azure Subscription. This will allow us to display the events from the Azure Event Grid in almost real time which will come handy later on. In the upcoming articles, we’ll focus on subscribing to the blob storage and sending event trigger to our endpoint we created here.  

Tags
Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Close