Is there any way which we can automatically sync data between device MQTT events and Device Twin data ?
For a given device in Azure IOT hub there is a mqtt event endpoint and a device twin endpoint associated to it.
I have tried sending MQTT event data to a particular device through device's event MQTT endpoint : devices//messages/events/ and it was successful. I was able to see the incoming data in the device explorer.
The Problem that I have is that, when we send some data to device through device's event mqtt endpoint, those data will not be automatically sync into the respective device's twin. I think it should happen automatically. In azure we have to manually (programmatically) do a twin data push for each event data that we receive through device's event endpoint.
This can be done through pushing mqtt data to device twin endpoint : $iothub/twin/PATCH/properties/reported/?$rid=ID
Is there anyway that we can do it automatically ? - Means automatically synchronize data from event mqtt stream to Device Twin ?