Build IoT Hub route and endpoint configs with message routing, custom endpoints, enrichments, and file upload settings.
Build IoT Hub route and endpoint configs with message routing, custom endpoints (Event Hub, Service Bus, Storage), enrichments, and file upload.
Required Fields
iotHubNameresourceGroupsku.nameroutesroutes[0].nameroutes[0].sourceroutes[0].endpointNameOutput will appear here...Build an Azure IoT Hub message routing configuration where routes match a source (DeviceMessages, DeviceLifecycleEvents, TwinChangeEvents) against a condition expression, sending matched messages to a customEndpoints entry (Event Hub, Service Bus Queue, or Storage Container), with enrichments injecting additional fields (often pulled from device twin tags) into the routed message before delivery. A route with condition: "true" (as the lifecycle-events and twin-changes-to-storage routes both use) matches every message from that source unconditionally, this is a deliberate, valid pattern for 'route everything of this type', not a placeholder or a mistake, distinct from telemetry-to-eventhub's genuinely conditional filter on messageType.
No, it's a deliberate, valid configuration meaning 'match every message from this source unconditionally', appropriate for event sources like DeviceLifecycleEvents or TwinChangeEvents where you typically want to capture every occurrence rather than filter, this pattern shows up correctly in production configurations, it's not incomplete or in need of a 'real' condition.
Enrichments add the specified key/value pairs (like tenantId pulled from $twin.tags.tenantId) as message properties/metadata delivered alongside the routed message to the specified endpointNames, rather than modifying the original device-sent message body itself, downstream consumers read enrichments from the message properties, distinct from the payload the device actually sent.
Yes, an enrichment's endpointNames array can list multiple endpoints (as the tenantId enrichment does, applying to both eh-telemetry and sb-alerts), meaning the same enriched field gets attached to messages routed to any of the listed endpoints, without needing to duplicate the enrichment definition per endpoint.
The builder validates that iotHubName, resourceGroup, sku.name, routes, and the first route's name/source/endpointName all resolve before accepting the JSON as a valid combined routing and endpoint configuration; it can't verify the referenced customEndpoints connection strings are valid and have correct send permissions, those are only confirmed when a message actually attempts routed delivery.
Don't assume a route's condition: "true" is an oversight needing a real filter, it's a legitimate pattern for sources where capturing every event is the actual intent, verify against the specific route's purpose rather than reflexively tightening every condition.
Enrichments pulling from device twin tags add a lookup cost per message at route-evaluation time, keep enrichment expressions simple and avoid pulling deeply nested or rarely-needed twin properties into every routed message if it's not actually used downstream.
Tune StorageContainer batchFrequencyInSeconds deliberately, a very frequent batch interval increases the number of small storage writes (and their per-operation cost), while a long interval delays downstream availability of the batched data, size it against actual downstream latency requirements.
Was this tool helpful?
Disclaimer: This tool runs entirely in your browser. No data is sent to our servers. Always verify outputs before using them in production. AWS, Azure, and GCP are trademarks of their respective owners.