Route Azure IoT Hub device-to-cloud messages to custom endpoints using message routing queries

domain: learn.microsoft.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Link a custom endpoint (Event Hub, Storage container, or Service Bus queue/topic) to the IoT Hub
  2. In the portal (Hub > Message Routing) or via CLI/ARM, create a route mapping a routing query to that endpoint
  3. Write the routing query using the SQL-like filter language against message body, application properties, or twin tags
  4. Configure or disable the fallback route, which catches messages that do not match any custom route
  5. Test the route by sending a matching sample message and confirming delivery at the endpoint
  6. Monitor routing metrics for dropped or misrouted messages

Known gotchas

Related routes

Send device-to-cloud telemetry messages to Azure IoT Hub over MQTT
azure.microsoft.com · 6 steps · unrated
Decide between cloud-to-device messaging and direct methods for sending a command to an Azure IoT Hub device and implement the correct one
learn.microsoft.com · 5 steps · unrated
Provision devices using Azure IoT Hub Device Provisioning Service with X.509 enrollment groups
azure-dps · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans