When my IoT Hub routes a device message to the built-in "Events" endpoint, the message's meta data (Message ID, Device ID, Enqueuing Time, etc.) is contained in the event. When the same message is routed to my custom endpoint (an Event Hub), the message's meta data is not contained in the event. Is there an option for forwarding the IoT Hub message meta data to custom endpoints?
Examples:
IoT Hub -> "Events" Endpoint -> Sampled input at stream analytics
{
"type": "Flow",
"payload": {
"timestamp": "2018-08-02 08:05:11.991",
"flow": 1
},
"EventProcessedUtcTime": "2018-08-02T08:06:04.3909310Z",
"PartitionId": 1,
"EventEnqueuedUtcTime": "2018-08-02T08:05:13.2180000Z",
"IoTHub": {
"MessageId": null,
"CorrelationId": null,
"ConnectionDeviceId": "...",
"ConnectionDeviceGenerationId": "636657651873407150",
"EnqueuedTime": "2018-08-02T08:05:13.0320000Z",
"StreamId": null
}
}
IoT Hub -> Custom Endpoint -> Event Hub -> Sampled input at stream analytics
{
"type": "Flow",
"payload": {
"timestamp": "2018-08-02 05:41:37.714",
"flow": 0
},
"EventProcessedUtcTime": "2018-08-02T05:53:58.3994321Z",
"PartitionId": 1,
"EventEnqueuedUtcTime": "2018-08-02T05:41:38.8890000Z"
}