IoTHub raw messaging client sample using AMQP
Dependencies: iothub_client EthernetInterface NTPClient iothub_amqp_transport azure_c_shared_utility mbed-rtos mbed azure_uamqp_c wolfSSL
This sample showcases the usage of Azure IoT client libraries with the AMQP transport for sending/receiving raw messages from an IoT Hub.
Diff: iothub_client_sample_amqp.c
- Revision:
- 80:ea6f6bd92023
- Parent:
- 79:21537a6b9511
- Child:
- 81:e7cc4a10410d
--- a/iothub_client_sample_amqp.c Mon Sep 11 09:24:14 2017 -0700 +++ b/iothub_client_sample_amqp.c Mon Sep 25 13:40:29 2017 -0700 @@ -218,6 +218,10 @@ (void)printf("ERROR: Map_AddOrUpdate Failed!\r\n"); } + // Setting messages with the same UUID values just for example. + (void)IoTHubMessage_SetMessageId(messages[iterator].messageHandle, "dec14a98-c5fc-430e-b4e3-33c1c434dcaf"); + (void)IoTHubMessage_SetCorrelationId(messages[iterator].messageHandle, "33c1c434dcaf-c5fc-430e-b4e3-dec14a98"); + (void)IoTHubMessage_SetContentTypeSystemProperty(messages[iterator].messageHandle, "application/json"); (void)IoTHubMessage_SetContentEncodingSystemProperty(messages[iterator].messageHandle, "utf-8");