Skip to content

Commit 41767ab

Browse files
authored
Merge pull request #187115 from ebertrams/properties-to-use-routing
add properties to use routing
2 parents b73a49a + b9baddd commit 41767ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ The following is a list of IoT Hub implementation-specific behaviors:
294294

295295
* IoT Hub only supports one active MQTT connection per device. Any new MQTT connection on behalf of the same device ID causes IoT Hub to drop the existing connection and **400027 ConnectionForcefullyClosedOnNewConnection** will be logged into IoT Hub Logs
296296

297+
* To route messages based on message body, you must first add property 'contentType' (`ct`) to the end of the MQTT topic and set its value to be `application/json;charset=utf-8`. An example is shown below. To learn more about routing messages either based on message properties or message body, please see the [IoT Hub message routing query syntax documentation](iot-hub-devguide-routing-query-syntax.md).
298+
299+
```devices/{device_id}/messages/events/$.ct=application%2Fjson%3Bcharset%3Dutf-8```
297300

298301
For more information, see [Messaging developer's guide](iot-hub-devguide-messaging.md).
299302

0 commit comments

Comments
 (0)