Time
1 hour
Difficulty
Beginner
CEU/CPE
1

Video Transcription

00:01
In this video, we'll create a national function with a cure message. Tree go.
00:06
Let's switch to azure Management Porto and do that.
00:12
Creating a function with acute trigger is very similar to the function with http three year
00:18
Inside our function up, you just need to click on the plus sign to create a new function,
00:25
and you can say like azure que storage trigger.
00:30
I will name our function que trigger
00:33
cyber The example.
00:38
What you need to do is you also need to select the Q name in the storage account connection.
00:44
I have already created a storage account. Now I need to connect my storage account and buying the cue to my,
00:53
uh, function
00:55
how? Click on New Here
00:58
and I will select my cyber very
01:00
input binding storage account
01:03
and the name of the Q is cyber very example que
01:10
so I won't bind this thing to my function.
01:15
And now, from now on, this function will be triggered by any message that is sent toe the cyber the example que in the storage account,
01:25
let's go and test that we can taste that directly from Dodger Porto when we are on the function and we click run
01:33
actual environment. Simon assimilates the sending of a message, and as you can see, the execution happens and we get log message here with the sample Data Cube.
01:47
Now let's try to do another test. I will go and use the actual Q and submit a message in need and see whether the
01:56
function will be triggered.
01:59
Let's go to the storage account
02:02
will go into the Q and submit a message using Azure Storage Explorer.
02:15
So here is the storage account.
02:16
Inside, the storage account is the cue.
02:23
So what will select storage exporter
02:25
and we'll go to the cues. As you can see, this is Sai Buri example Q. And we'll just create a new message there.
02:34
How the message
02:36
and we'll typing the message he sees a message from Storage
02:42
Explorer
02:45
will submit the message.
02:49
As you can see,
02:51
this is the message. The message text and all the other information will go back to our function
02:57
and you'll see that the function trigger immediately.
03:00
And here is our
03:02
This is a message from storage Exporter Log message.
03:07
As you can see, you can get information from the messages so you have a complete
03:14
access to the message inside the function so you can pull information out of the message and process this message based on the information inside it.
03:27
As you can see, creating a function that is
03:30
triggered by a que message is quite reviewer.
03:34
In this lesson, we also learned how you can bind a service azure service to your function. What we did is we bound our
03:43
storage account and the cue to our function, and we use that to trigger the function.

Up Next

Azure Functions

This Azure Functions course explains the core concepts of serverless services in Azure, how to develop functions that use different triggers and how to secure access of Azure Functions and manage configuration secrets.

Instructed By

Instructor Profile Image
Toddy Mladenov
Instructor