Skip to content

Commit 8fda67e

Browse files
Freshness.
1 parent 2b59198 commit 8fda67e

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

articles/event-grid/custom-event-to-eventhub.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
---
22
title: 'Quickstart: Send custom events to an event hub - Event Grid, Azure CLI'
33
description: Learn how to use Azure Event Grid and the Azure CLI to publish a topic and subscribe to that event, by using an event hub for the endpoint.
4-
ms.date: 01/31/2024
4+
ms.date: 06/24/2024
55
ms.topic: quickstart
66
ms.custom: devx-track-azurecli, mode-api
7+
#customer intent: As a developer, I want to use Azure Event Grid to interact with an Azure Event Hubs subscription to support app interaction.
78
---
89

910
# Quickstart: Route custom events to an event hub by using Event Grid and the Azure CLI
1011

11-
[Azure Event Grid](overview.md) is a highly scalable and serverless event broker that you can use to integrate applications via events. Event Grid delivers events to supported event handlers, such as Azure Event Hubs. [Event handlers](event-handlers.md).
12-
1312
In this quickstart, you use the Azure CLI to create an Event Grid custom topic and an Event Hubs subscription for that topic. You then send sample events to the custom topic and verify that those events are delivered to an event hub.
1413

14+
[Azure Event Grid](overview.md) is a highly scalable and serverless event broker that you can use to integrate applications via events. Event Grid delivers events to supported event handlers, such as Azure Event Hubs. [Event handlers](event-handlers.md).
15+
1516
[!INCLUDE [quickstarts-free-trial-note.md](~/reusable-content/ce-skilling/azure/includes/quickstarts-free-trial-note.md)]
1617

1718
## Create a resource group
1819

19-
Event Grid topics are Azure resources, and they must be placed in an Azure resource group. The resource group is a logical collection into which Azure resources are deployed and managed.
20+
Event Grid topics are Azure resources. Create them in an Azure resource group. The resource group is a logical collection in which Azure resources are deployed and managed.
2021

2122
Create a resource group by using the [az group create](/cli/azure/group#az-group-create) command. The following example creates a resource group named `gridResourceGroup` in the `westus2` location.
2223

23-
Select **Open Cloud Shell** to open Azure Cloud Shell on the right pane. Select the **Copy** button to copy the command, paste it in Cloud Shell, and then select the Enter key to run the command.
24+
Select **Open Cloud Shell** to open Azure Cloud Shell on the right pane. Select the **Copy** button to copy the command, paste it in Cloud Shell, and then select the **Enter** key to run the command.
2425

2526
```azurecli-interactive
2627
az group create --name gridResourceGroup --location westus2
@@ -67,7 +68,7 @@ Before you subscribe to the custom topic, create the endpoint for the event mess
6768
6869
## Subscribe to a custom topic
6970
70-
You subscribe to an Event Grid topic to tell Event Grid which events you want to track. The following example subscribes to the custom topic that you created, and it passes the resource ID of the event hub for the endpoint. The endpoint is in this format:
71+
You subscribe to an Event Grid topic to tell Event Grid which events you want to track. The following example subscribes to the custom topic that you created. It passes the resource ID of the event hub for the endpoint. The endpoint is in this format:
7172
7273
`/subscriptions/<AZURE SUBSCRIPTION ID>/resourceGroups/<RESOURCE GROUP NAME>/providers/Microsoft.EventHub/namespaces/<NAMESPACE NAME>/eventhubs/<EVENT HUB NAME>`
7374
@@ -95,7 +96,7 @@ endpoint=$(az eventgrid topic show --name $topicname -g gridResourceGroup --quer
9596
key=$(az eventgrid topic key list --name $topicname -g gridResourceGroup --query "key1" --output tsv)
9697
```
9798

98-
For the sake of simplicity in this article, you use sample event data to send to the custom topic. Typically, an application or an Azure service would send the event data.
99+
For simplicity, this article uses sample event data to send to the custom topic. Typically, an application or an Azure service would send the event data.
99100

100101
The cURL tool sends HTTP requests. In this article, you use cURL to send the event to the custom topic. The following example sends three events to the Event Grid topic:
101102

@@ -107,7 +108,7 @@ do
107108
done
108109
```
109110

110-
In the Azure portal, on the **Overview** page for your Event Hubs namespace, notice that Event Grid sent those three events to the event hub. You see the same chart on the **Overview** page for the `demohub` Event Hubs instance.
111+
In the Azure portal, the **Overview** page for your Event Hubs namespace shows that Event Grid sent those three events to the event hub. You see the same chart on the **Overview** page for the `demohub` Event Hubs instance.
111112

112113
:::image type="content" source="./media/custom-event-to-eventhub/show-result.png" lightbox="./media/custom-event-to-eventhub/show-result.png" alt-text="Screenshot that shows the portal page with an incoming message count of 3.":::
113114

@@ -119,7 +120,7 @@ Typically, you create an application that retrieves event messages from the even
119120

120121
## Clean up resources
121122

122-
If you plan to continue working with this event, don't clean up the resources that you created in this article. Otherwise, use the following command to delete the resources:
123+
If you plan to continue working with this event, don't remove the resources that you created in this article. Otherwise, use the following command to delete the resources:
123124

124125
```azurecli-interactive
125126
az group delete --name gridResourceGroup

0 commit comments

Comments
 (0)