Share via

What is IoT Hub integration? — Links to Event Hub, Storage

Dhruvesh Sheladiya 0 Reputation points Microsoft Employee
2026-05-14T18:53:27.7366667+00:00

Description

I am trying to understand how Azure IoT Hub integrates with other Azure services, such as Event Hubs and Storage, and how device data flows from IoT Hub to these downstream services.


Environment Details

Azure Service: Azure IoT Hub

Feature: Integration with Azure services

Data Flow: Device → IoT Hub → Azure services

Integration Targets: Event Hub, Storage, Service Bus, Cosmos DB

Mechanism: Message routing + endpoints


Investigation Details / Observations

IoT Hub acts as a central message hub that collects device telemetry and forwards it to other services. [bing.com]

Integration is enabled via endpoints and message routing. [docs.azure.cn]

Each IoT Hub has a built-in endpoint compatible with Event Hubs. [Azure CDN...0040010386 | Outlook]

Custom endpoints can be configured to connect IoT Hub to other Azure services. [docs.azure.cn]

Messages are routed automatically based on defined rules or sent to default endpoints if no match occurs. [docs.azure.cn]


Supported Integration Targets (Observed)

IoT Hub can integrate with multiple Azure services, including:

Azure Event Hubs

Used for real-time streaming and ingestion of high-volume telemetry [bing.com]

Azure Storage (Blob / Data Lake)

  Used for **long-term storage and archival of device data** [[bing.com]](https://bing.com/search?q=Azure+IoT+Hub+integration+endpoints+event+hub+storage+explanation)
  
  **Azure Service Bus (Queues / Topics)**
  
     Used for **reliable messaging and workflows between applications** [[bing.com]](https://bing.com/search?q=Azure+IoT+Hub+integration+endpoints+event+hub+storage+explanation)
     
     **Azure Cosmos DB**
     
        Used for **fast, scalable NoSQL data storage and querying** [[bing.com]](https://bing.com/search?q=Azure+IoT+Hub+integration+endpoints+event+hub+storage+explanation)
        

How Integration Works (Observed Flow)

Device sends telemetry to IoT Hub

IoT Hub evaluates routing rules (queries)

Messages are forwarded to configured endpoints (services)

Multiple services can receive the same message if rules match

If no rule matches → message goes to default Event Hub endpoint [docs.azure.cn]


Core Components Observed

Endpoints

Represent destination services (Event Hub, Storage, etc.)

  Can be built-in or custom
  
  **Message Routing**
  
     Defines how and where messages are sent
     
        Uses query-based rules to filter data
        
        **Integration Pattern**
        
           Push-based model: IoT Hub **automatically sends data to downstream services** [[azure.github.io]](https://azure.github.io/IoTTrainingPack/modules/DataEgress/routing.html)
           

Steps Followed / Investigation Done

Reviewed IoT Hub endpoint and routing documentation

Explored supported Azure service integrations

Analyzed how data flows from IoT Hub to downstream systems

Observed default vs custom endpoint behavior

Checked integration scenarios like storage and streaming


Mitigation / Considerations Explored

Using Event Hub for real-time analytics pipelines

Using Storage for cost-effective long-term data retention

Routing different message types to different services

Ensuring correct configuration of endpoints and permissions


Challenges / Confusions

When to use Event Hub vs Storage vs Service Bus

How to design routing rules for multiple integrations

Handling failures when a target endpoint is unavailable

Understanding latency differences across integrated services


Ask / Clarification Needed

What is the best integration pattern for real-time vs batch processing?

  • How does IoT Hub handle retries if an endpoint fails?

What are best practices for integrating multiple downstream services efficiently?

Description

I am trying to understand how Azure IoT Hub integrates with other Azure services, such as Event Hubs and Storage, and how device data flows from IoT Hub to these downstream services.

Environment Details

Azure Service: Azure IoT Hub

  Feature: Integration with Azure services
  
     Data Flow: Device → IoT Hub → Azure services
     
        Integration Targets: Event Hub, Storage, Service Bus, Cosmos DB
        
           Mechanism: Message routing + endpoints
           
           ### **Investigation Details / Observations**

              IoT Hub acts as a **central message hub that collects device telemetry and forwards it to other services**. [[bing.com]](https://bing.com/search?q=IoT+Hub+integration+how+data+flows+to+other+Azure+services+explanation)
              
                 Integration is enabled via **endpoints and message routing**. [[docs.azure.cn]](https://docs.azure.cn/en-us/iot-hub/iot-hub-devguide-messages-read-custom)
                 
                    Each IoT Hub has a **built-in endpoint compatible with Event Hubs**. [[Azure CDN...0040010386 | Outlook]](https://outlook.office365.com/owa/?ItemID=AAMkADE5ZDc4MjQ5LWVlMmYtNDVmOS1iNmVmLTVjODA4YWU0MTY0OABGAAAAAAAh7Ata75fuQYH28iXSc0%2b8BwDAUWlFbiD7QZa1FyBJ5mHzAAAAAAEMAADAUWlFbiD7QZa1FyBJ5mHzAAdo44C4AAA%3d&exvsurl=1&viewmodel=ReadMessageItem)
                    
                       Custom endpoints can be configured to connect IoT Hub to other Azure services. [[docs.azure.cn]](https://docs.azure.cn/en-us/iot-hub/iot-hub-devguide-messages-read-custom)
                       
                          Messages are routed automatically based on defined rules or sent to default endpoints if no match occurs. [[docs.azure.cn]](https://docs.azure.cn/en-us/iot-hub/iot-hub-devguide-messages-read-custom)
                          
                          ### **Supported Integration Targets (Observed)**

                          IoT Hub can integrate with multiple Azure services, including:
                          
                             **Azure Event Hubs**
                             
                                   Used for **real-time streaming and ingestion of high-volume telemetry** [[bing.com]](https://bing.com/search?q=Azure+IoT+Hub+integration+endpoints+event+hub+storage+explanation)
                                   
                                      **Azure Storage (Blob / Data Lake)**
                                      
                                            Used for **long-term storage and archival of device data** [[bing.com]](https://bing.com/search?q=Azure+IoT+Hub+integration+endpoints+event+hub+storage+explanation)
                                            
                                               **Azure Service Bus (Queues / Topics)**
                                               
                                                     Used for **reliable messaging and workflows between applications** [[bing.com]](https://bing.com/search?q=Azure+IoT+Hub+integration+endpoints+event+hub+storage+explanation)
                                                     
                                                        **Azure Cosmos DB**
                                                        
                                                              Used for **fast, scalable NoSQL data storage and querying** [[bing.com]](https://bing.com/search?q=Azure+IoT+Hub+integration+endpoints+event+hub+storage+explanation)
                                                              
                                                              ### **How Integration Works (Observed Flow)**

                                                                 Device sends telemetry to IoT Hub
                                                                 
                                                                    IoT Hub evaluates **routing rules (queries)**
                                                                    
                                                                       Messages are forwarded to configured **endpoints (services)**
                                                                       
                                                                          Multiple services can receive the same message if rules match
                                                                          
                                                                             If no rule matches → message goes to **default Event Hub endpoint** [[docs.azure.cn]](https://docs.azure.cn/en-us/iot-hub/iot-hub-devguide-messages-read-custom)
                                                                             
                                                                             ### **Core Components Observed**

                                                                                **Endpoints**
                                                                                
                                                                                      Represent destination services (Event Hub, Storage, etc.)
                                                                                      
                                                                                            Can be built-in or custom
                                                                                            
                                                                                               **Message Routing**
                                                                                               
                                                                                                     Defines how and where messages are sent
                                                                                                     
                                                                                                           Uses query-based rules to filter data
                                                                                                           
                                                                                                              **Integration Pattern**
                                                                                                              
                                                                                                                    Push-based model: IoT Hub **automatically sends data to downstream services** [[azure.github.io]](https://azure.github.io/IoTTrainingPack/modules/DataEgress/routing.html)
                                                                                                                    
                                                                                                                    ### **Steps Followed / Investigation Done**

                                                                                                                       Reviewed IoT Hub endpoint and routing documentation
                                                                                                                       
                                                                                                                          Explored supported Azure service integrations
                                                                                                                          
                                                                                                                             Analyzed how data flows from IoT Hub to downstream systems
                                                                                                                             
                                                                                                                                Observed default vs custom endpoint behavior
                                                                                                                                
                                                                                                                                   Checked integration scenarios like storage and streaming
                                                                                                                                   
                                                                                                                                   ### **Mitigation / Considerations Explored**

                                                                                                                                      Using Event Hub for **real-time analytics pipelines**
                                                                                                                                      
                                                                                                                                         Using Storage for **cost-effective long-term data retention**
                                                                                                                                         
                                                                                                                                            Routing different message types to different services
                                                                                                                                            
                                                                                                                                               Ensuring correct configuration of endpoints and permissions
                                                                                                                                               
                                                                                                                                               ### **Challenges / Confusions**

                                                                                                                                                  When to use Event Hub vs Storage vs Service Bus
                                                                                                                                                  
                                                                                                                                                     How to design routing rules for multiple integrations
                                                                                                                                                     
                                                                                                                                                        Handling failures when a target endpoint is unavailable
                                                                                                                                                        
                                                                                                                                                           Understanding latency differences across integrated services
                                                                                                                                                           
                                                                                                                                                           ### **Ask / Clarification Needed**

                                                                                                                                                              What is the best integration pattern for real-time vs batch processing?
                                                                                                                                                              
                                                                                                                                                                 How does IoT Hub handle retries if an endpoint fails?
                                                                                                                                                                 
                                                                                                                                                                    What are best practices for integrating multiple downstream services efficiently?
                                                                                                                                                                    
Azure IoT Hub
Azure IoT Hub

An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.


1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-05-14T18:53:55.2666667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Azure IoT Hub integration is the way device data is collected by IoT Hub and then pushed to other Azure services through endpoints and message routing.

    At a high level, the flow is:

    1. Devices send telemetry and other messages to IoT Hub.
    2. IoT Hub receives the data on its device endpoints and the built-in Event Hubs–compatible endpoint.
    3. Message routing rules evaluate each incoming message.
    4. Based on those rules, IoT Hub forwards the message to one or more service endpoints (Storage, Event Hubs, Service Bus, Cosmos DB, etc.).

    Core concepts:

    • IoT Hub as central hub
      • Acts as a bi-directional message hub between devices and the cloud.
      • Once data reaches IoT Hub, it can be processed or routed to other Azure services for analytics, ML, and automation.
      • IoT Hub does not store or process customer data outside the geography where the hub is deployed.
    • Built-in endpoint
      • Every IoT hub has a built-in Event Hubs–compatible endpoint (messages/events).
      • This endpoint collects device-to-cloud messages by default and retains them for up to seven days.
      • Standard Event Hubs SDKs can be used to read from this endpoint.
      • When any custom route is created, data stops flowing to the built-in endpoint unless a route explicitly targets it. A fallback route to the built-in endpoint is enabled by default when the hub is created via portal or CLI.
    • Custom endpoints
      • IoT Hub can link existing Azure services in the subscription as custom endpoints for message routing. Supported custom endpoints are:
        • Storage containers (Azure Blob Storage, Azure Data Lake Storage Gen2)
        • Event Hubs
        • Service Bus queues
        • Service Bus topics
        • Cosmos DB
      • These are service endpoints (sinks) for routes; devices cannot write directly to them.
    • Message routing
      • Message routing is the primary integration mechanism for device-to-cloud messages.
      • Each incoming message is evaluated against routing queries.
      • A message is delivered to all endpoints whose routing queries it matches.
      • If a message does not match any route, it goes to the default endpoint (built-in Event Hubs–compatible endpoint), provided the fallback route is enabled.
      • Routing can send telemetry and non-telemetry events (for example, device lifecycle or twin change events) to downstream services.
      • For Storage endpoints, IoT Hub can write data in Avro (default) or JSON. JSON requires contentType=application/json and contentEncoding=UTF-8 in message system properties.
    • Integration targets and patterns
      • Event Hubs / built-in endpoint:
        • Used for high-throughput streaming and real-time processing pipelines.
        • Downstream services such as Azure Stream Analytics, Databricks, or custom consumers read from Event Hubs.
      • Azure Storage (Blob / Data Lake Storage Gen2):
        • Used for long-term storage, archival, and batch analytics.
        • IoT Hub writes messages as blobs in Avro or JSON format.
      • Service Bus queues/topics:
        • Used when device data needs to drive workflows or application-level messaging patterns.
      • Cosmos DB:
        • Used when device data must be stored in a NoSQL store for low-latency queries and scalable operational workloads.
    • Real-time vs batch integration
      • Real-time processing:
        • Use IoT Hub message routing to Event Hubs (or the built-in endpoint) and then connect real-time analytics or event processing services.
        • Message routing maintains message order, which is important for some real-time scenarios.
      • Batch / historical processing:
        • Use message routing to Storage (Blob or ADLS Gen2) for cost-effective retention and later batch processing.
    • Event Grid integration
      • In addition to message routing, IoT Hub integrates with Azure Event Grid.
      • Event Grid is a publish-subscribe event routing service that can fan out IoT Hub events (telemetry and device events) to many subscribers, including Functions, Logic Apps, Storage, Service Bus queues, and webhooks.
      • Event Grid is typically used when many different endpoints must react to IoT Hub events, or when integration with non-Azure systems via webhooks is required.
    • Choosing between message routing and Event Grid
      • Use message routing when:
        • The primary need is to route device telemetry to Storage, Event Hubs, Service Bus, or Cosmos DB.
        • Ordering of messages must be preserved.
        • Querying on message properties, body, or device twin is needed directly in IoT Hub routing.
      • Use Event Grid when:
        • Many different endpoints (up to hundreds) must receive events.
        • Integration with a wide variety of Azure services and external systems via webhooks is required.
        • Telemetry and device lifecycle events are used to trigger event-driven workflows.
    • Multiple downstream services
      • A single message can be routed to multiple endpoints simultaneously if it matches multiple routing queries.
      • This enables patterns such as:
        • Real-time analytics via Event Hubs.
        • Long-term archival via Storage.
        • Operational workflows via Service Bus or Cosmos DB.

    Details such as retry behavior and latency characteristics for each downstream service are not described in the provided context.


    References:

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.