I'm trying to achieve a very simple routing logic in Azure IoT Hub. Whenever a telemetry message should trigger an alert the application property "hasEvents" is set to true and should be routed to a different endpoint.
I'm trying to test this in the Azure Portal but I can't seem to find the correct query syntax.
When I hit the "Test route" button, this is what I'm getting:
For both hasEvents
and "hasEvents"
I receive this warning in the browser: The server didn't understand your query. Check your query syntax and try again.
hasEvents = true
results in Invalid operands to binary operator '=': have 'string' and 'bool', expected 'string' and 'string'
"hasEvents" = "true"
results in `The message didn't match the query.
Could this be an issue with the Portal or am I missing here something?
To route message to different endpoint, when application property "hasEvents" is set to true, you should write a query this way:
hasEvents = 'true'
Here is link that describes query syntax.
https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-routing-query-syntax