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/event-schema-event-grid-namespace.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -230,7 +230,7 @@ The data object contains the following properties:
230
230
|`namespaceName`| string | Name of the Event Grid namespace where the MQTT client was connected or disconnected. |
231
231
|`clientAuthenticationName`| string | Unique identifier for the MQTT client that the client presents to the service for authentication. This case-sensitive string can be up to 128 characters long, and supports UTF-8 characters.|
232
232
|`clientSessionName`| string | Unique identifier for the MQTT client's session. This case-sensitive string can be up to 128 characters long, and supports UTF-8 characters.|
233
-
|`sequenceNumber`|string| A number that helps indicate order of MQTT client session connected or disconnected events. Latest event will have a sequence number that is higher than the previous event. |
233
+
|`sequenceNumber`|long| A number that helps indicate order of MQTT client session connected or disconnected events. Latest event will have a sequence number that is higher than the previous event. |
234
234
|`disconnectionReason`| string | Reason for the disconnection of the MQTT client's session. The value could be one of the values in the disconnection reasons table. |
235
235
|`createdOn`| string | The time the client resource is created based on the provider's UTC time. |
236
236
|`updatedOn`| string | The time the client resource is last updated based on the provider's UTC time. If the client resource was never updated, this value is identical to the value of the 'createdOn' property |
Copy file name to clipboardExpand all lines: articles/event-grid/mqtt-client-life-cycle-events.md
+18-4Lines changed: 18 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ ms.author: geguirgu
10
10
# MQTT Clients Life Cycle Events
11
11
12
12
Client Life Cycle events allow applications to react to events about the client connection status or the client resource operations. It allows you to:
13
-
-Keep track of your client's connection status. For example, you can build an application that queries the connection status of each client before running a specific operation.
14
-
- React with a mitigation action for client disconnections. For example, you can build an application that updates a database, creates a ticket, and delivers an email notification every time a client is disconnected for mitigating action.
15
-
- Track the namespace that your clients are attached to during automated failovers.
13
+
-Monitor your clients' connection status. For example, you can build an application that analyzes clients' connections to optimize behavior.
14
+
- React with a mitigation action for client disconnections. For example, you can build an application that initiates an auto-mitigation flow or creates a support ticketevery time a client is disconnected.
15
+
- Track the namespace that your clients are attached to. For example, confirm that your clients are connected to the right namespace after you initiate a failover.
@@ -254,7 +254,7 @@ az eventgrid system-topic create --resource-group <Resource Group > --name <Syst
254
254
```
255
255
256
256
## Behavior:
257
-
- There's no latency guarantee for the client lifecycle events.
257
+
- There's no latency guarantee for the client lifecycle events. The client connection status events indicate the last reported state of the client session's connection, not the real-time connection status.
258
258
- Duplicate client life cycle events may be published.
259
259
- The client life cycle events' timestamp indicates when the service detected the events, which may differ from the actual time of the event.
260
260
- The order of client life cycle events isn't guaranteed, events may arrive out of order. However, the sequence number on the connection status events can be used to determine the original order of the events.
@@ -263,6 +263,20 @@ az eventgrid system-topic create --resource-group <Resource Group > --name <Syst
263
263
- Example 1: if a client gets created, then updated twice within 3 seconds, EG will emit only one MQTTClientCreatedOrUpdated event with the final values for the metadata of the client.
264
264
- Example 2: if a client gets created, then deleted within 5 seconds, EG will emit only MQTTClientDeleted event.
265
265
266
+
### Order connection status events:
267
+
The sequence number on the MQTTClientSessionConnected and MQTTClientSessionDisconnected events can be used to determine the last reported state of the client session's connection as the sequence number is incremented with every new event. The sequence number for the MQTTClientSessionDisconnected always matches the sequence number of the MQTTClientSessionConnected event for the same connection. For example, the list of events and sequence numbers below is a sample of events in the right order for the same client:
- Store the sequence number and the connection status from the first event.
276
+
- For every new MQTTClientSessionConnected event:
277
+
- if the new sequence number is greater than the previous one, update the sequence number and the connection status to match the new event.
278
+
- For every new MQTTClientSessionDisconnected event:
279
+
- if the new sequence number is equal than or greater than the previous one, update the sequence number and the connection status to match the new event.
266
280
267
281
## Next steps
268
282
- To learn more about system topics, go to [System topics in Azure Event Grid](system-topics.md)
0 commit comments