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/iot-hub/iot-hub-amqp-support.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,13 +122,13 @@ As shown above, a C2D feedback message has content type of `application/vnd.micr
122
122
* Key `originalMessageId` in feedback body has the ID of the original C2D message sent by the service. This can be used to correlate feedback to C2D messages.
123
123
124
124
### Receive telemetry messages (service client)
125
-
By default, IoT Hub stores ingested device telemetry messages in a build-in Event Hubs. Your service client can use the AMQP protocol to receive the stored events.
125
+
By default, IoT Hub stores ingested device telemetry messages in a built-in Event hub. Your service client can use the AMQP protocol to receive the stored events.
126
126
127
-
For this purpose, the service client first needs to connect to the IoT Hub endpoint and receive a redirection address to the built-in Event Hubs. Service client then uses the provided address to connect to the built-in Event Hub.
127
+
For this purpose, the service client first needs to connect to the IoT Hub endpoint and receive a redirection address to the built-in Event Hubs. Service client then uses the provided address to connect to the built-in Event hub.
128
128
129
129
In each step, the client needs to present the following pieces of information:
130
-
* Valid service credentials (SAS token);
131
-
* A well-formatted path to the consumer group partition it intends to retrieve messages from;
130
+
* Valid service credentials (service SAS token).
131
+
* A well-formatted path to the consumer group partition it intends to retrieve messages from. For a given consumer group and partition ID, the path has the following format: `/messages/events/ConsumerGroups/<consumer_group>/Partitions/<partition_id>` (the default consumer group is `$Default`).
132
132
* An optional filtering predicate to designate a starting point in the partition (this can be in the form of a sequence number, offset or enqueued timestamp).
133
133
134
134
The code snippet below uses [uAMQP library in Python](https://github.com/Azure/azure-uamqp-python) to demonstrate the above steps.
Even though the code snippet above demonstrates receiving events from a single partition ID, a typical application often needs to retrieve events stored on all the hub partitions.
189
+
For a given device ID, IoT Hub uses a hash of the device ID to determine which partition to store messages in. Furthermore, note that even though the code snippet above demonstrates receiving events from a single partition ID, a typical application often needs to retrieve events stored on all the hub partitions.
0 commit comments