Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CreationTimeUtc is not handled in message #44

Open
reddyduggempudi opened this issue Feb 25, 2021 · 2 comments
Open

CreationTimeUtc is not handled in message #44

reddyduggempudi opened this issue Feb 25, 2021 · 2 comments

Comments

@reddyduggempudi
Copy link

Device can buffer up messages and send them all at some frequency. To accomplish, you can set CreationTimeUtc (payload creation time) in the event message. common.Message has this field, but looks like it is not set in the transport.send() https://github.com/amenzhinsky/iothub/blob/master/iotdevice/transport/mqtt/mqtt.go#L480
You need to set "$.ctime". Similarly other properties need to be honored like https://github.com/Azure/azure-iot-sdk-csharp/blob/master/iothub/device/src/Transport/Mqtt/MqttIotHubAdapter.cs#L1197

@amenzhinsky
Copy link
Owner

377c091

But I'm not sure about time format though, Azure uses different time formats across API, for now it simply pushes ctime to amqp.ApplicationProperties that goes to msg.Properties["iothub-creation-time-utc"] as a raw string with no time parsing.

@reddyduggempudi
Copy link
Author

I followed up internally with the team. The format for this time should be Format("2006-01-02T15:04:05")
E.g.: 2021-23-03T17:38:59

So, please change it to above format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants