Skip to content

Commit fec6be6

Browse files
updated events and limits
1 parent 7a55602 commit fec6be6

File tree

3 files changed

+36
-18
lines changed

3 files changed

+36
-18
lines changed

articles/event-grid/event-schema-event-grid-namespace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ The data object contains the following properties:
230230
| `namespaceName` | string | Name of the Event Grid namespace where the MQTT client was connected or disconnected. |
231231
| `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.|
232232
| `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. |
234234
| `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. |
235235
| `createdOn` | string | The time the client resource is created based on the provider's UTC time. |
236236
| `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 |

articles/event-grid/includes/limits.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,30 @@ The following limits apply to MQTT in Azure Event Grid namespace resource.
3030

3131
| Limit description | Limit |
3232
|----------------------------------------------|-----------------------------------------------------------------------------------|
33-
| MQTT connections | 10,000 per TU |
33+
| MQTT connections per namespace | 10,000 per TU |
34+
| Sessions per namespace | 10,000 per TU |
3435
| MQTT inbound publish requests per namespace | Up to 1,000 messages per second or 1 MB per second per TU (whichever comes first) |
35-
| MQTT inbound publish requests per client | 100 messages per second |
36+
| MQTT inbound publish requests per connection | Up to 100 messages per second or 1 MB per second (whichever comes first) |
3637
| MQTT outbound publish requests per namespace | Up to 1,000 messages per second or 1 MB per second per TU (whichever comes first) |
37-
| MQTT outbound publish requests per client | 100 messages per second |
38+
| MQTT outbound publish requests per connection| Up to 100 messages per second or 1 MB per second (whichever comes first) |
39+
| Connect requests | 200 requests per second per TU |
40+
| Subscribe and unsubscribe requests | 200 requests per second per TU |
41+
| Max message size | 512 KB |
42+
| Topic size | 256 B |
43+
| Segments per topic filter | 8 |
44+
| MQTTv5 topic aliases | 10 per connection |
45+
| Subscriptions per MQTT client session | 50 |
46+
| Topic filters per MQTT SUBSCRIBE packet | 10 |
47+
| Maximum keep-alive interval | 1160 |
3848
| Registered client resources | 10,000 clients per TU |
3949
| CA certificates | 2 |
4050
| Client groups | 10 |
4151
| Topic spaces | 10 |
42-
| Topic templates | 10 per topic space |
52+
| Topic templates | 10 per topic space |
4353
| Permission bindings | 100 |
44-
| Max message size | 512 KB |
45-
| Topic size | 256 B |
46-
| Topic alias | 10 per connection |
47-
| New connect requests | 200 requests per second per TU |
48-
| Subscribe and unsubscribe operations | 200 requests per second per TU |
49-
| Total number of subscriptions per MQTT client session | 50 |
50-
| Maximum number of topic filters per MQTT SUBSCRIBE packet | 10 |
51-
| Maximum number of segments per topic filter | 8 |
52-
| Maximum number of concurrent connections allowed per namespace | 10,000 per TU |
54+
55+
56+
5357

5458
## Events limits in namespace
5559

articles/event-grid/mqtt-client-life-cycle-events.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ ms.author: geguirgu
1010
# MQTT Clients Life Cycle Events
1111

1212
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 cleints' 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 ticket every 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.
1616

1717
[!INCLUDE [mqtt-preview-note](./includes/mqtt-preview-note.md)]
1818

@@ -254,7 +254,7 @@ az eventgrid system-topic create --resource-group <Resource Group > --name <Syst
254254
```
255255

256256
## 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.
258258
- Duplicate client life cycle events may be published.
259259
- The client life cycle events' timestamp indicates when the service detected the events, which may differ from the actual time of the event.
260260
- 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
263263
- 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.
264264
- Example 2: if a client gets created, then deleted within 5 seconds, EG will emit only MQTTClientDeleted event.
265265

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 will be incremented with every new event. The sequence number for the MQTTClientSessionDisconnected will always match 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:
268+
- MQTTClientSessionConnected > "sequenceNumber": 1
269+
- MQTTClientSessionDisconnected > "sequenceNumber": 1
270+
- MQTTClientSessionConnected > "sequenceNumber": 2
271+
- MQTTClientSessionDisconnected > "sequenceNumber": 2
272+
273+
Here is a sample logic to order the events:
274+
For each client:
275+
- 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.
266280

267281
## Next steps
268282
- To learn more about system topics, go to [System topics in Azure Event Grid](system-topics.md)

0 commit comments

Comments
 (0)