Forum Discussion
Staffan01
Jan 20, 2025Copper Contributor
Routing on IOT Edge
Hi, I have a problem that I have been dealing with for quite some time. Trying to put a "where" in a routing for AZIOT edge hub. have tested this which works. FROM /messages/* WHERE $connectionModuleId = 'noded' INTO BrokeredEndpoint("/modules/testjob/inputs/edgehub") . But what I want to do is a "where" against appProperties. I have tried every conceivable "syntax" for this?? Inserts an example message.
{
"message": {
"systemProperties": {
"contentType": "application/json",
"contentEncoding": "UTF-8",
"iothub-message-source": "deviceMessages",
"iothub-enqueuedtime": "2017-05-08T18:55:31.8514657Z"
},
"appProperties": {
"processingPath": "{cold | warm | hot}",
"verbose": "{true, false}",
"severity": 1-5,
"testDevice": "{true | false}"
},
"body": "{\"Weather\":{\"Temperature\":50}}"
}
}
Thanks for any help I can get. Can't find any documentation for this?
- tyagivishu9Copper Contributor
I think you should use
/messages/* WHERE $connectionModuleId = 'noded' AND processingPath = 'hot'
Refer https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-routing-query-syntax#message-properties-query-expressions