Skip to content

Commit 0966145

Browse files
committed
Updated screenshots and links, minor updates to improve Acrolinx score
1 parent d8b549e commit 0966145

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

articles/iot-hub/iot-hub-devguide-messages-c2d.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: SoniaLopezBravo
66
ms.author: sonialopez
77
ms.service: azure-iot-hub
88
ms.topic: concept-article
9-
ms.date: 08/14/2024
9+
ms.date: 06/25/2025
1010
ms.custom: mqtt, devx-track-azurecli
1111
---
1212

@@ -37,33 +37,33 @@ When the IoT hub service sends a message to a device, the service sets the messa
3737

3838
A device can also:
3939

40-
* *Reject* the message, which causes the IoT hub to set it to the *Dead lettered* state. There is no dead letter queue for recovering these messages. Devices that connect over the Message Queuing Telemetry Transport (MQTT) protocol can't reject cloud-to-device messages.
40+
* *Reject* the message, which causes the IoT hub to set it to the *Dead lettered* state. There's no dead letter queue for recovering these messages. Devices that connect over the Message Queuing Telemetry Transport (MQTT) protocol can't reject cloud-to-device messages.
4141

4242
* *Abandon* the message, which causes the IoT hub to put the message back in the queue, with the state set to *Enqueued*. Devices that connect over the MQTT protocol can't abandon cloud-to-device messages.
4343

44-
A thread could fail to process a message without notifying the IoT hub. In this case, messages automatically transition from the *Invisible* state back to the *Enqueued* state after a visibility time-out (or lock time-out). The length of this time-out is one minute and cannot be changed.
44+
A thread could fail to process a message without notifying the IoT hub. In this case, messages automatically transition from the *Invisible* state back to the *Enqueued* state after a visibility timeout (or lock timeout). The length of this timeout is one minute and can't be changed.
4545

4646
The **max delivery count** property on the IoT hub determines the maximum number of times a message can transition between the *Enqueued* and *Invisible* states. After that number of transitions, the IoT hub sets the state of the message to *Dead lettered*. Similarly, the IoT hub sets the state of a message to *Dead lettered* after its expiration time.
4747

48-
A device ordinarily completes a cloud-to-device message when the loss of the message doesn't affect the application logic. An example of this completion might be when the device has persisted the message content locally or has successfully executed an operation. The message could also carry transient information, whose loss wouldn't impact the functionality of the application. Sometimes, for long-running tasks, you can:
48+
A device ordinarily completes a cloud-to-device message when the loss of the message doesn't affect the application logic. An example of this completion might be when the device persists the message content locally or successfully executes an operation. The message could also carry transient information, whose loss wouldn't impact the functionality of the application. Sometimes, for long-running tasks, you can:
4949

50-
* Complete the cloud-to-device message after the device has persisted the task description in local storage.
50+
* Complete the cloud-to-device message after the device persists the task description in local storage.
5151

5252
* Notify the solution back end with one or more device-to-cloud messages at various stages of progress of the task.
5353

5454
## Message expiration (time to live)
5555

56-
Every cloud-to-device message has an expiration time. This time is set by either of the following options:
56+
Every cloud-to-device message has an expiration time. Either of the following options sets the expiration time:
5757

5858
* The **ExpiryTimeUtc** property in the service
59-
* The IoT hub, by using the default *time to live* that's specified as an IoT hub property
59+
* The IoT hub, by using the default *time to live* specified as an IoT hub property
6060

6161
For more information about message expiration, see [Cloud-to-device configuration options](#cloud-to-device-configuration-options).
6262

63-
A common way to take advantage of a message expiration and to avoid sending messages to disconnected devices is to set short *time to live* values. This approach achieves the same result as maintaining the device connection state, but it is more efficient. When you request message acknowledgments, the IoT hub notifies you which devices are:
63+
A common way to take advantage of a message expiration and to avoid sending messages to disconnected devices is to set short *time to live* values. This approach achieves the same result as maintaining the device connection state, but it's more efficient. When you request message acknowledgments, the IoT hub notifies you which devices:
6464

65-
* Able to receive messages.
66-
* Are not online or have failed.
65+
* Are able to receive messages.
66+
* Aren't online or have failed.
6767

6868
## Message feedback
6969

@@ -76,25 +76,25 @@ When you send a cloud-to-device message, the service can request the delivery of
7676
| negative | If the cloud-to-device message reaches the *Dead lettered* state, the IoT hub generates a feedback message. |
7777
| full | The IoT hub generates a feedback message in either case. |
7878

79-
If the **Ack** property value is set to *full*, and you don't receive a feedback message, it means that the feedback message has expired. The service can't know what happened to the original message. In practice, a service should ensure that it can process the feedback before it expires. The maximum expiration time is two days, which leaves time to get the service running again if a failure occurs.
79+
If the **Ack** property value is set to *full*, and you don't receive a feedback message, it means that the feedback message expired. The service can't know what happened to the original message. In practice, a service should ensure that it can process the feedback before it expires. The maximum expiration time is two days, which leaves time to get the service running again if a failure occurs.
8080

81-
As explained in [Endpoints](iot-hub-devguide-endpoints.md), the IoT hub delivers feedback through a service-facing endpoint, */messages/servicebound/feedback*, as messages. The semantics for receiving feedback are the same as for cloud-to-device messages. Whenever possible, message feedback is batched in a single message, with the following format:
81+
As explained in [IoT Hub endpoints](iot-hub-devguide-endpoints.md), the IoT hub delivers feedback through a service-facing endpoint, */messages/servicebound/feedback*, as messages. The semantics for receiving feedback are the same as for cloud-to-device messages. Whenever possible, message feedback is batched in a single message, with the following format:
8282

8383
| Property | Description |
8484
| ------------ | ----------- |
85-
| EnqueuedTime | A timestamp that indicates when the feedback message was received by the hub. |
85+
| EnqueuedTime | A timestamp that indicates when the hub received the feedback message. |
8686
| UserId | `{iot hub name}` |
8787
| ContentType | `application/vnd.microsoft.iothub.feedback.json` |
8888

89-
The system will send out the feedback either when the batch reaches to 64 messages, or in 15 seconds from last sent, whichever comes first.
89+
The system sends out the feedback either when the batch reaches to 64 messages, or in 15 seconds from last sent, whichever comes first.
9090

9191
The body is a JSON-serialized array of records, each with the following properties:
9292

9393
| Property | Description |
9494
| ------------------ | ----------- |
9595
| enqueuedTimeUtc | A timestamp that indicates when the outcome of the message happened. For example, a timestamp that indicates when the hub received the feedback message or the original message expired. |
9696
| originalMessageId | The *MessageId* of the cloud-to-device message to which this feedback information relates. |
97-
| statusCode | A required string, used in feedback messages that are generated by the IoT hub: <br/> *Success* <br/> *Expired* <br/> *DeliveryCountExceeded* <br/> *Rejected* <br/> *Purged* |
97+
| statusCode | A required string, used by the IoT hub when generating feedback messages: <br/> *Success* <br/> *Expired* <br/> *DeliveryCountExceeded* <br/> *Rejected* <br/> *Purged* |
9898
| description | String values for *StatusCode*. |
9999
| deviceId | The *DeviceId* of the target device of the cloud-to-device message to which this piece of feedback relates. |
100100
| deviceGenerationId | The *DeviceGenerationId* of the target device of the cloud-to-device message to which this piece of feedback relates. |
@@ -140,7 +140,7 @@ Each IoT hub exposes the following configuration options for cloud-to-device mes
140140

141141
You can set the configuration options in the Azure portal or Azure CLI:
142142

143-
* **Azure portal**: Under **Hub settings** on your IoT hub, select **Built-in endpoints** and go to **Cloud to device messaging**. (Setting the **feedback.maxDeliveryCount** and **feedback.lockDurationAsIso8601** properties is not currently supported in Azure portal.)
143+
* **Azure portal**: Under **Hub settings** on your IoT hub, select **Built-in endpoints** and go to **Cloud to device messaging**. (Setting the **feedback.maxDeliveryCount** or **feedback.lockDurationAsIso8601** property isn't currently supported in Azure portal.)
144144

145145
:::image type="content" source="./media/iot-hub-devguide-messages-c2d/c2d-configuration-portal.png" alt-text="Set configuration options for cloud-to-device messaging in the portal" border="true":::
146146

22.7 KB
Loading

0 commit comments

Comments
 (0)