Skip to content

Commit 6e725bf

Browse files
Merge pull request #262586 from kgremban/jan5-mqttevents
Consolidate event grid state reporting info
2 parents 1204720 + e78b611 commit 6e725bf

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

articles/iot-hub/iot-hub-event-grid.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: kgremban
77
ms.service: iot-hub
88
services: iot-hub
99
ms.topic: conceptual
10-
ms.date: 01/22/2022
10+
ms.date: 01/05/2024
1111
ms.author: kgremban
1212
ms.custom: [amqp, mqtt, 'Role: Cloud Development']
1313
---
@@ -178,10 +178,7 @@ For device telemetry events, IoT Hub will create the default [message route](iot
178178

179179
Device connected and device disconnected events are available for devices connecting using either the MQTT or AMQP protocol, or using either of these protocols over WebSockets. Requests made only with HTTPS won't trigger device connection state notifications.
180180

181-
* For devices connecting using Java, Node, or Python [Azure IoT SDKs](iot-hub-devguide-sdks.md) with the [MQTT protocol](../iot/iot-mqtt-connect-to-iot-hub.md) will have connection states sent automatically.
182-
* For devices connecting using the Java, Node, or Python [Azure IoT SDKs](iot-hub-devguide-sdks.md) with the [AMQP protocol](iot-hub-amqp-support.md), a cloud-to-device link should be created to reduce any delay in accurate connection states.
183-
* For devices connecting using the .NET [Azure IoT SDK](iot-hub-devguide-sdks.md) with the [MQTT](../iot/iot-mqtt-connect-to-iot-hub.md) or [AMQP](iot-hub-amqp-support.md) protocol won’t send a device connected event until an initial device-to-cloud or cloud-to-device message is sent/received.
184-
* Outside of the Azure IoT SDKs, in MQTT these operations equate to SUBSCRIBE or PUBLISH operations on the appropriate messaging [topics](../iot/iot-mqtt-connect-to-iot-hub.md). Over AMQP these equate to attaching or transferring a message on the [appropriate link paths](iot-hub-amqp-support.md).
181+
For information about monitoring device status with Event Grid, see [Monitor device connection status](./monitor-device-connection-state.md#event-grid).
185182

186183
### Device connection state interval
187184

articles/iot-hub/monitor-device-connection-state.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: kgremban
66
ms.author: kgremban
77
ms.topic: reference
88
ms.service: iot-hub
9-
ms.date: 10/18/2022
9+
ms.date: 01/05/2024
1010
---
1111

1212
# Monitor device connection status
@@ -56,15 +56,12 @@ Device connection state events are available for devices connecting using either
5656

5757
Outside of the Azure IoT SDKs, in MQTT these operations equate to SUBSCRIBE or PUBLISH operations on the appropriate messaging topics. Over AMQP these operations equate to attaching or transferring a message on the appropriate link paths.
5858

59-
IoT Hub doesn't report each individual device connect and disconnect, but rather publishes the current connection state taken at a periodic 60-second snapshot. Receiving either the same connection state event with different sequence numbers or different connection state events both mean that there was a change in the device connection state during the 60-second window.
60-
6159
### Event Grid limitations
6260

6361
Using Event Grid to monitor your device status comes with the following limitations:
6462

6563
* Event Grid doesn't report each individual device connect and disconnect event. Instead, it polls for device status every 60 seconds and publishes the most recent connection state if there was a state change. For this reason, state change reports may be delayed up to one minute and individual state changes may be unreported if multiple events happen within the 60-second window.
66-
* Devices that use MQTT start reporting device status automatically. However, devices that use AMQP need [cloud-to-device link](iot-hub-amqp-support.md#invoke-cloud-to-device-messages-service-client) before they can report device status.
67-
* The IoT C SDK doesn't have a connect method. Customers must send telemetry to begin reporting accurate device connection states.
64+
* Devices that use AMQP need [cloud-to-device link](iot-hub-amqp-support.md#invoke-cloud-to-device-messages-service-client) before they can report device status.
6865
* Event Grid exposes a public endpoint that can't be hidden.
6966

7067
If any of these limitations affect your ability to use Event Grid for device status monitoring, then you should consider building a custom device heartbeat pattern instead.

0 commit comments

Comments
 (0)