Skip to content

Commit 075e4f4

Browse files
committed
MQTT freshness
1 parent ec305cb commit 075e4f4

9 files changed

+10
-21
lines changed
1.04 KB
Loading
-3.74 KB
Loading
-3.48 KB
Loading
6 KB
Loading
2.15 KB
Loading
33.5 KB
Loading
30 KB
Loading

articles/event-grid/mqtt-publish-and-subscribe-portal.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,23 @@
11
---
2-
title: 'Quickstart: Publish and subscribe on an MQTT topic using portal'
2+
title: Publish and subscribe on an MQTT topic using portal
33
description: 'Quickstart guide to use Azure Event Grid’s MQTT broker feature and Azure portal to publish and subscribe MQTT messages on a topic.'
44
ms.topic: quickstart
5-
ms.custom:
6-
- build-2023
7-
- ignite-2023
8-
ms.date: 11/15/2023
5+
ms.date: 12/13/2024
96
author: george-guirguis
107
ms.author: geguirgu
118
ms.subservice: mqtt
9+
# Customer intent: I want to know how to publish and subscribe to an Azure Event Grid MQTT topic using Azure portal.
1210
---
1311

1412
# Quickstart: Publish and subscribe to MQTT messages on Event Grid Namespace with Azure portal
15-
16-
In this article, you use the Azure portal to do the following tasks:
17-
18-
1. Create an Event Grid namespace and enable MQTT broker
19-
2. Create sub resources such as clients, client groups, and topic spaces
20-
3. Grant clients access to publish and subscribe to topic spaces
21-
4. Publish and receive messages between clients
22-
13+
In this quickstart, you use the Azure portal to create an Event Grid namespace with MQTT broker enabled, create sub resources such as clients, client groups, and topic spaces, grant clients access to publish and subscribe to topic spaces, and then publish and receive messages between clients.
2314

2415

2516
## Prerequisites
2617

2718
- Create an [Azure free account](https://azure.microsoft.com/free/) If you don't have an Azure subscription.
2819
- Read through [Event Grid overview](overview.md) before starting this tutorial, if you're new to Azure Event Grid.
29-
- Ensure that port 8883 is open in your firewall. The sample in this tutorial uses the MQTT protocol, which communicates over port 8883. This port may be blocked in some corporate and educational network environments.
20+
- Ensure that port 8883 is open in your firewall. The sample in this tutorial uses the MQTT protocol, which communicates over port 8883. This port might be blocked in some corporate and educational network environments.
3021
- You need an X.509 client certificate to generate the thumbprint and authenticate the client connection.
3122

3223
## Generate sample client certificate and thumbprint
@@ -98,11 +89,11 @@ After a successful installation of Step, you should open a command prompt in you
9889
1. Client authentication name is defaulted to the client name. For this tutorial, change it to `client1-authn-ID`. You need to include this name as `Username` in the CONNECT packet.
9990
1. In this tutorial, you use thumbprint based authentication. Include the first client certificate’s thumbprint in the **Primary Thumbprint**.
10091
101-
:::image type="content" source="./media/mqtt-publish-and-subscribe-portal/mqtt-client1-metadata.png" alt-text="Screenshot of client 1 configuration.":::
92+
:::image type="content" source="./media/mqtt-publish-and-subscribe-portal/mqtt-client1-metadata.png" alt-text="Screenshot of the configuration of client 1.":::
10293
6. Select **Create** on the toolbar to create another client.
10394
7. Repeat the above steps to create a second client named `client2`. Change the authentication name to `client2-authn-ID` and include the **second** client certificate’s thumbprint in the **Primary Thumbprint**.
10495
105-
:::image type="content" source="./media/mqtt-publish-and-subscribe-portal/mqtt-client2-metadata.png" alt-text="Screenshot of client 2 configuration.":::
96+
:::image type="content" source="./media/mqtt-publish-and-subscribe-portal/mqtt-client2-metadata.png" alt-text="Screenshot of the configuration of client 2.":::
10697
10798
> [!NOTE]
10899
> - To keep the QuickStart simple, you'll be using Thumbprint match for authentication. For detailed steps on using X.509 CA certificate chain for client authentication, see [client authentication using certificate chain](./mqtt-certificate-chain-client-authentication.md).
@@ -115,7 +106,6 @@ After a successful installation of Step, you should open a command prompt in you
115106
116107
:::image type="content" source="./media/mqtt-publish-and-subscribe-portal/create-topic-space-menu.png" alt-text="Screenshot of Topic spaces page with create button selected." lightbox="./media/mqtt-publish-and-subscribe-portal/create-topic-space-menu.png":::
117108
1. Provide a **name** for the topic space, on the **Create topic space** page.
118-
1. Select **+ Add topic template**.
119109
120110
:::image type="content" source="./media/mqtt-publish-and-subscribe-portal/create-topic-space-name.png" alt-text="Screenshot of Create topic space with the name.":::
121111
1. Enter `contosotopics/topic1` for the topic template, and then select **Create** to create the topic space.
@@ -145,8 +135,7 @@ After a successful installation of Step, you should open a command prompt in you
145135
## Connecting the clients to the EG Namespace using MQTTX app
146136
147137
1. For publish / subscribe MQTT messages, you can use any of your favorite tools. For demonstration purpose, publish / subscribe is shown using MQTTX app, which can be downloaded from https://mqttx.app/.
148-
149-
:::image type="content" source="./media/mqtt-publish-and-subscribe-portal/mqttx-app-add-client.png" alt-text="Screenshot showing MQTTX app left rail to add new client.":::
138+
1. Select **+** on the navigation bar to the left.
150139
1. Configure client1 with
151140
- **Name** as `client1` (this value can be anything)
152141
- **Client ID** as `client1-session1` (Client ID in the CONNECT packet is used to identify the session ID for the client connection)
@@ -160,7 +149,7 @@ After a successful installation of Step, you should open a command prompt in you
160149
1. Update the **port** to **8883**.
161150
1. Toggle **SSL/TLS** to ON.
162151
1. Toggle **SSL Secure** to ON, to ensure service certificate validation.
163-
1. Select **Certificate** as **Self signed**.
152+
1. Select **Certificate** as **CA or Self signed certificates**.
164153
1. Provide the path for client certificate file.
165154
1. Provide the path for the client key file.
166155
1. Rest of the settings can be left with predefined default values.
@@ -192,7 +181,7 @@ After a successful installation of Step, you should open a command prompt in you
192181
193182
:::image type="content" source="./media/mqtt-publish-and-subscribe-portal/mqttx-app-subscribe-message.png" alt-text="Screenshot showing the message received by the subscribing client on MQTTX app." lightbox="./media/mqtt-publish-and-subscribe-portal/mqttx-app-subscribe-message.png":::
194183
195-
## Next steps
184+
## Related content
196185
- [Tutorial: Route MQTT messages to Azure Event Hubs using namespace topics](mqtt-routing-to-event-hubs-portal-namespace-topics.md)
197186
- [Tutorial: Route MQTT messages to Azure Functions using custom topics](mqtt-routing-to-azure-functions-portal.md)
198187
- For code samples, go to [this repository.](https://github.com/Azure-Samples/MqttApplicationSamples/tree/main)

0 commit comments

Comments
 (0)