You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-create-storage-queue-triggered-function.md
+10-33Lines changed: 10 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Create a function in Azure triggered by queue messages
3
3
description: Use Azure Functions to create a serverless function that is invoked by messages submitted to a queue in Azure.
4
4
ms.assetid: 361da2a4-15d1-4903-bdc4-cc4b27fc3ff4
5
5
ms.topic: how-to
6
-
ms.date: 12/28/2023
6
+
ms.date: 09/18/2024
7
7
ms.custom: mvc, cc996988-fb4f-47
8
8
---
9
9
# Create a function triggered by Azure Queue storage
@@ -34,53 +34,30 @@ Next, you create a function in the new function app.
34
34
35
35
| Setting | Suggested value | Description |
36
36
|---|---|---|
37
+
|**Job type**| Append to app | You only see this setting for a Python v2 app. |
37
38
|**Name**| Unique in your function app | Name of this queue triggered function. |
38
39
|**Queue name**| myqueue-items | Name of the queue to connect to in your Storage account. |
39
40
|**Storage account connection**| AzureWebJobsStorage | You can use the storage account connection already being used by your function app, or create a new one. |
40
41
41
-
Azure creates the Queue Storage triggered function based on the provided values
42
-
43
-
Next, you connect to your Azure storage account and create the **myqueue-items** storage queue.
42
+
Azure creates the Queue Storage triggered function based on the provided values.Next, you connect to your Azure storage account and create the **myqueue-items** storage queue.
44
43
45
44
## Create the queue
46
45
47
-
1. In your function, on the **Overview** page, select your resource group.
48
-
49
-
:::image type="content" source="./media/functions-create-storage-queue-triggered-function/functions-storage-resource-group.png" alt-text="Select your Azure portal resource group." border="true":::
50
-
51
-
1. Find and select your resource group's storage account.
52
-
53
-
:::image type="content" source="./media/functions-create-storage-queue-triggered-function/functions-storage-account-access.png" alt-text="Access the storage account." border="true":::
46
+
1. Return to the **Overview** page for your function app, select your **Resource group**, then find and select the storage account in your resource group.
54
47
55
-
1. Choose **Queues**, and then choose **+ Queue**.
56
-
57
-
:::image type="content" source="./media/functions-create-storage-queue-triggered-function/functions-storage-add-queue.png" alt-text="Add a queue to your storage account in the Azure portal." border="true":::
48
+
1. In the storage account page, select **Data storage** > **Queues** > **+ Queue**.
58
49
59
50
1. In the **Name** field, type `myqueue-items`, and then select **Create**.
60
51
61
-
:::image type="content" source="./media/functions-create-storage-queue-triggered-function/functions-storage-name-queue.png" alt-text="Name the queue storage container." border="true":::
62
-
63
-
Now that you have a storage queue, you can test the function by adding a message to the queue.
52
+
1. Select the new **myqueue-items** queue, which you use to test the function by adding a message to the queue.
64
53
65
54
## Test the function
66
55
67
-
1. Back in the Azure portal, browse to your function expand the **Logs** at the bottom of the page and make sure that log streaming isn't paused.
68
-
69
-
:::image type="content" source="./media/functions-create-storage-queue-triggered-function/functions-queue-storage-log-expander.png" alt-text="Expand the log in the Azure portal." border="true":::
70
-
71
-
1. In a separate browser window, go to your resource group in the Azure portal, and select the storage account.
72
-
73
-
1. Select **Queues**, and then select the **myqueue-items** container.
74
-
75
-
:::image type="content" source="./media/functions-create-storage-queue-triggered-function/functions-storage-queue.png" alt-text="Go to your myqueue-items queue in the Azure portal." border="true":::
76
-
77
-
1. Select **Add message**, and type "Hello World!" in **Message text**. Select **OK**.
78
-
79
-
:::image type="content" source="./media/functions-create-storage-queue-triggered-function/functions-storage-queue-test.png" alt-text="Screenshot shows the Add message button selected and the Message text field highlighted." border="true":::
80
-
81
-
1. Wait for a few seconds, then go back to your function logs and verify that the new message has been read from the queue.
56
+
1. In a new browser window, return to your function app page and select **Log stream**, which displays real-time logging for your app.
57
+
58
+
1. In the **myqueue-items** queue, select **Add message**, type "Hello World!" in **Message text**, and select **OK**.
82
59
83
-
:::image type="content" source="./media/functions-create-storage-queue-triggered-function/function-app-in-portal-editor.png" alt-text="View message in the logs." border="true":::
60
+
1. Go back to your functionapp logs and verify that the function ran to process the message from the queue.
84
61
85
62
1. Back in your storage queue, select **Refresh** and verify that the message has been processed and is no longer in the queue.
0 commit comments