Skip to content

Commit 0bad8ca

Browse files
committed
edit pass: two-iot-hub-articles
1 parent 83c2f04 commit 0bad8ca

File tree

2 files changed

+56
-56
lines changed

2 files changed

+56
-56
lines changed

articles/iot-hub/iot-hub-amqp-support.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ receive_client = uamqp.ReceiveClient(uri, debug=True)
5555
```
5656

5757
### Invoke cloud-to-device messages (service client)
58-
To learn about the cloud-to-device (C2D) message exchange between the service and the IoT hub and between the device and the IoT hub, see [Send cloud-to-device messages from your IoT hub](iot-hub-devguide-messages-c2d.md). The service client uses two links to send messages and receive feedback for previously sent messages from devices, as described in the following table:
58+
To learn about the cloud-to-device message exchange between the service and the IoT hub and between the device and the IoT hub, see [Send cloud-to-device messages from your IoT hub](iot-hub-devguide-messages-c2d.md). The service client uses two links to send messages and receive feedback for previously sent messages from devices, as described in the following table:
5959

6060
| Created by | Link type | Link path | Description |
6161
|------------|-----------|-----------|-------------|
62-
| Service | Sender link | `/messages/devicebound` | C2D messages that are destined for devices are sent to this link by the service. Messages sent over this link have their `To` property set to the target device's receiver link path, `/devices/<deviceID>/messages/devicebound`. |
62+
| Service | Sender link | `/messages/devicebound` | Cloud-to-device messages that are destined for devices are sent to this link by the service. Messages sent over this link have their `To` property set to the target device's receiver link path, `/devices/<deviceID>/messages/devicebound`. |
6363
| Service | Receiver link | `/messages/serviceBound/feedback` | Completion, rejection, and abandonment feedback messages that come from devices received on this link by service. For more information about feedback messages, see [Send cloud-to-device messages from an IoT hub](./iot-hub-devguide-messages-c2d.md#message-feedback). |
6464

65-
The following code snippet demonstrates how to create a C2D message and send it to a device by using the [uAMQP library in Python](https://github.com/Azure/azure-uamqp-python).
65+
The following code snippet demonstrates how to create a cloud-to-device message and send it to a device by using the [uAMQP library in Python](https://github.com/Azure/azure-uamqp-python).
6666

6767
```python
6868
import uuid
@@ -116,10 +116,10 @@ for msg in batch:
116116
print('unknown message:', msg.properties.content_type)
117117
```
118118

119-
As shown in the preceding code, a C2D feedback message has a content type of *application/vnd.microsoft.iothub.feedback.json*. You can use the properties in the message's JSON body to infer the delivery status of the original message:
119+
As shown in the preceding code, a cloud-to-device feedback message has a content type of *application/vnd.microsoft.iothub.feedback.json*. You can use the properties in the message's JSON body to infer the delivery status of the original message:
120120
* Key `statusCode` in the feedback body has one of the following values: *Success*, *Expired*, *DeliveryCountExceeded*, *Rejected*, or *Purged*.
121121
* Key `deviceId` in the feedback body has the ID of the target device.
122-
* Key `originalMessageId` in the feedback body has the ID of the original C2D message that was sent by the service. You can use this delivery status to correlate feedback to C2D messages.
122+
* Key `originalMessageId` in the feedback body has the ID of the original cloud-to-device message that was sent by the service. You can use this delivery status to correlate feedback to cloud-to-device messages.
123123

124124
### Receive telemetry messages (service client)
125125

@@ -232,19 +232,19 @@ The following link paths are supported as device operations:
232232

233233
| Created by | Link type | Link path | Description |
234234
|------------|-----------|-----------|-------------|
235-
| Devices | Receiver link | `/devices/<deviceID>/messages/devicebound` | C2D messages that are destined for devices are received on this link by each destination device. |
236-
| Devices | Sender link | `/devices/<deviceID>messages/events` | Device-to-cloud (D2C) messages that are sent from a device are sent over this link. |
237-
| Devices | Sender link | `/messages/serviceBound/feedback` | C2D message feedback sent to the service over this link by devices. |
235+
| Devices | Receiver link | `/devices/<deviceID>/messages/devicebound` | Cloud-to-device messages that are destined for devices are received on this link by each destination device. |
236+
| Devices | Sender link | `/devices/<deviceID>messages/events` | Device-to-cloud messages that are sent from a device are sent over this link. |
237+
| Devices | Sender link | `/messages/serviceBound/feedback` | Cloud-to-device message feedback sent to the service over this link by devices. |
238238

239239

240-
### Receive C2D commands (device client)
241-
C2D commands that are sent to devices arrive on a `/devices/<deviceID>/messages/devicebound` link. Devices can receive these messages in batches, and use the message data payload, message properties, annotations, or application properties in the message as needed.
240+
### Receive cloud-to-device commands (device client)
241+
Cloud-to-device commands that are sent to devices arrive on a `/devices/<deviceID>/messages/devicebound` link. Devices can receive these messages in batches, and use the message data payload, message properties, annotations, or application properties in the message as needed.
242242

243-
The following code snippet uses the [uAMQP library in Python](https://github.com/Azure/azure-uamqp-python)) to receive C2D messages by a device.
243+
The following code snippet uses the [uAMQP library in Python](https://github.com/Azure/azure-uamqp-python)) to receive cloud-to-device messages by a device.
244244

245245
```python
246246
# ...
247-
# Create a receive client for the C2D receive link on the device
247+
# Create a receive client for the cloud-to-device receive link on the device
248248
operation = '/devices/{device_id}/messages/devicebound'.format(device_id=device_id)
249249
uri = 'amqps://{}:{}@{}{}'.format(urllib.quote_plus(username), urllib.quote_plus(sas_token), hostname, operation)
250250

@@ -281,12 +281,12 @@ while True:
281281
### Send telemetry messages (device client)
282282
You can also send telemetry messages from a device by using AMQP. The device can optionally provide a dictionary of application properties, or various message properties, such as message ID.
283283

284-
The following code snippet uses the [uAMQP library in Python](https://github.com/Azure/azure-uamqp-python) to send D2C messages from a device.
284+
The following code snippet uses the [uAMQP library in Python](https://github.com/Azure/azure-uamqp-python) to send device-to-cloud messages from a device.
285285

286286

287287
```python
288288
# ...
289-
# Create a send client for the D2C send link on the device
289+
# Create a send client for the device-to-cloud send link on the device
290290
operation = '/devices/{device_id}/messages/events'.format(device_id=device_id)
291291
uri = 'amqps://{}:{}@{}{}'.format(urllib.quote_plus(username), urllib.quote_plus(sas_token), hostname, operation)
292292

0 commit comments

Comments
 (0)