When sending telemetry messages from a device to the following MQTT topic:
devices/<MY_DEVICE>/messages/events/%24.uid=<MY_UID>&%24.ct=application%2Fjson&%24.ce=utf-8&%24.ctime=<SOME_TIME>
With actual values for <...>
and routing them to a service bus topic I can retrieve them using the Azure Python SDK which spits out instances of azure.servicebus.ServiceBusReceivedMessage
(see the documentation).
These object contain most of the information I’m interested in, e.g. content_type
is correctly set to "application/json"
and application_properties
contains iothub-connection-device-id
and iothub-creation-time-utc
. However there seems to be no way to access:
user-id
content-encoding
- Something like
iothub-message-source
that indicates that this is a telemetry message.
This seems very strange to me, if this is not possible in general that would mean a backend application had no way of knowing what IoT Hub a telemetry message comes from, how it is encoded or that it is telemetry at all (and not say, a device twin change message), making the SDK almost useless.
Is there information I am missing?