Hello @조영우 우짜
We have to decode the message payload value from base64 format after the message is landed in Blob Storage (You can do this in multiple ways, like using Azure Functions)
IoT Hub supports writing data to Azure Storage in the Apache Avro format and the JSON format. The default is AVRO. When using JSON encoding, you must set the contentType to application/json and contentEncoding to UTF-8 in the message system properties. Both of these values are case-insensitive. If the content encoding is not set, then IoT Hub will write the messages in base 64 encoded format.
The IoT Device should follow the below instructions to send the message to Azure IoTHub ,
// Set message body type and content encoding.
message.ContentEncoding = "utf-8";
message.ContentType = "application/json";
If looking for Message Routing to work:
In order for IoT Hub to know whether the message can be routed based on its body contents, the message must contain specific headers which describe the content and encoding of its body. In particular, messages must have both these headers for routing on message body to work:
- Content type of "application/json"
- Content encoding must match one of:
"utf-8"
"utf-16"
"utf-32"