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/event-grid/mqtt-publish-and-subscribe-cli.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ In this article, you use the Azure CLI to do the following tasks:
21
21
## Prerequisites
22
22
- If you don't have an [Azure subscription](/azure/guides/developer/azure-developer-guide#understanding-accounts-subscriptions-and-billing), create an [Azure free account](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio) before you begin.
23
23
- If you're new to Azure Event Grid, read through [Event Grid overview](/azure/event-grid/overview) before starting this tutorial.
24
+
- Register the Event Grid resource provider as per [Register the Event Grid resource provider](/azure/event-grid/custom-event-quickstart-portal#register-the-event-grid-resource-provider).
24
25
- Make sure that port 8883 is open in your firewall. The sample in this tutorial uses MQTT protocol, which communicates over port 8883. This port may be blocked in some corporate and educational network environments.
25
26
- Use the Bash environment in [Azure Cloud Shell](/azure/cloud-shell/overview). For more information, see [Quickstart for Bash in Azure Cloud Shell](/azure/cloud-shell/quickstart).
26
27
- If you prefer to run CLI reference commands locally, [install](/cli/azure/install-azure-cli) the Azure CLI. If you're running on Windows or macOS, consider running Azure CLI in a Docker container. For more information, see [How to run the Azure CLI in a Docker container](/cli/azure/run-azure-cli-docker).
Copy file name to clipboardExpand all lines: articles/event-grid/mqtt-routing-to-event-hubs-cli.md
+6-16Lines changed: 6 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,16 +19,11 @@ In this article, you perform the following tasks:
19
19
- View the MQTT messages in the Event Hubs using Stream Analytics
20
20
21
21
## Prerequisites
22
-
23
-
- If you don't have an [Azure subscription](/azure/guides/developer/azure-developer-guide#understanding-accounts-subscriptions-and-billing), create an [Azure free account](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio) before you begin.
24
-
- If you're new to Azure Event Grid, read through [Event Grid overview](/azure/event-grid/overview) before starting this tutorial.
25
-
- Register the Event Grid resource provider as per [Register the Event Grid resource provider](/azure/event-grid/custom-event-quickstart-portal#register-the-event-grid-resource-provider).
26
-
- Make sure that port 8883 is open in your firewall. The sample in this tutorial uses MQTT protocol, which communicates over port 8883. This port may be blocked in some corporate and educational network environments.
27
-
- An Event Grid Namespace in your Azure subscription. If you don't have a namespace yet, you can follow the steps in [Publish and subscribe on a MQTT topic](./mqtt-publish-and-subscribe-cli.md).
22
+
- Complete the [Publish and subscribe on a MQTT topic](./mqtt-publish-and-subscribe-cli.md) Quickstart. In this tutorial, you can update the same namespace to enable routing.
28
23
- This tutorial uses Event Hubs, Event Grid Custom Topics, and Event Subscriptions. You can find more information here:
29
-
- Creating an Event Grid topic: [Create a custom topic using CLI](/azure/event-grid/custom-event-quickstart). While creating the Event Grid topic, ensure to create with Event Schema as Cloud Event Schema v1.0 in the Advanced tab.
30
-
- Creating an Event Hubs: [Quickstart - Create an event hub using Azure CLI](/azure/event-hubs/event-hubs-quickstart-cli).
31
-
- You can view the Event Hubs data using Stream Analytics: [Process data from Event Hubs Azure using Stream Analytics](/azure/event-hubs/process-data-azure-stream-analytics).
24
+
- Create an event hub that is used as an event handler for events sent to the custom topic - [Quickstart - Create an event hub using Azure CLI - Azure Event Hubs](/azure/event-hubs/event-hubs-quickstart-cli).
25
+
- Process events sent to the event hub using Stream Analytics, which writes output to any destination that ASA supports - [Process data from Event Hubs Azure using Stream Analytics - Azure Event Hubs](/azure/event-hubs/process-data-azure-stream-analytics).
26
+
32
27
33
28
> [!IMPORTANT]
34
29
> The Azure [CLI Event Grid extension](/cli/azure/eventgrid) does not yet support namespaces and any of the resources it contains. We will use [Azure CLI resource](/cli/azure/resource) to create Event Grid resources.
@@ -54,11 +49,7 @@ az role assignment create --assignee "{Your Principal ID}" --role "EventGrid Dat
54
49
- Create Event Grid Subscription. Update it with your subscription ID, resource group ID, EG custom topic name.
55
50
56
51
```azurecli-interactive
57
-
az eventgrid event-subscription create --name contosoEventSubscription \
> - It needs to be in the same region as the namespace.
69
60
> - You need to assign "EventGrid Data Sender" role to yourself on the Event Grid Topic.
70
61
71
-
72
62
## Configure routing in the Event Grid Namespace
73
-
-Save the Namespace object in namespace.json file in resources folder.
63
+
-We use the namespace created in the [Publish and subscribe on a MQTT topic](./mqtt-publish-and-subscribe-cli.md). Update the Namespace object in namespace.json file to enable routing to the Event Grid topic in this step.
0 commit comments